I think I might have found an issue with Jackson
If use the ObjectNode.putPOJO method on an array of strings then the
strings don't have quotes put round them. Using set and
ObjectMapper.valueToTree() works.
The following code demonstrates the problem.
ObjectNode rootNode = objectMapper.createObjectNode();
rootNode.putPOJO("pojo", names);
rootNode.set("set", objectMapper.valueToTree(names));
System.out.println(rootNode);
The output is
{"pojo":[Zaphod, Arthur, Trillian,
Ford],"set":["Zaphod","Arthur","Trillian","Ford"]}
This means that readTree cannot parse the string.
Cheers,
Ian
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.