This repository was archived by the owner on Jan 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Jackson does not ignore whitespace in XML elementย #67
Copy link
Copy link
Open
Description
To reproduce:
git clone [email protected]:shevek/bugs-tests-and-examples.git
git checkout jackson-xml-whitespace
./gradlew installDist && ./build/install/bugs-tests-and-examples/bin/bugs-tests-and-examples
Actual behaviour:
Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "" (class org.anarres.tests.Datasource$Column), not marked as ignorable (2 known properties: "members", "role"])
at [Source: java.io.BufferedInputStream@2c039ac6; line: 6, column: 40] (through reference chain: org.anarres.tests.Workbook["datasources"]->java.util.ArrayList[0]->org.anarres.tests.Datasource["column"]->java.util.ArrayList[0]->org.anarres.tests.Datasource$Column[""])
Variants of expected behaviour:
When tweaking the XML file a bit:
Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token
Expected behaviour:
Ignores whitespace in empty list element and does not attempt to synthesize a value out of it.
Related issues:
- Jackson can't handle @XmlElements and @XmlElementWrapper correctlyย #34
- https://stackoverflow.com/questions/27397419/jackson-ignore-whitespace-in-empty-xmlwrapperelement-collection (stated workaround does not work)
Thank you.
darioseidl
Metadata
Metadata
Assignees
Labels
No labels