On Thu, May 3, 2018 at 5:02 AM, <[email protected]> wrote: > It seems that the ObjectNode.PutPOJO method does not put quotes around the > members of a string array, > > List<String> names = List.of("Zaphod", "Arthur", "Trillian", "Ford"); > > > ObjectMapper objectMapper = new ObjectMapper(); > > > ObjectNode rootNode = objectMapper.createObjectNode(); > > rootNode.putPOJO("pojo", names); > > rootNode.set("set", objectMapper.valueToTree(names)); > > System.out.println(rootNode); > > > The above code demonstrates the issue. > > The string output cannot be parsed by ObjectMapper.readTree
This is not really along original intended usage for putPOJO (since `List`s are not POJOs), but it would seem like supporting it might be easy enough. Could you do me a favor and file an issue against `jackson-databind`, with above description? That way you get credit for reporting the issue and I can link new feature to reported issue for release notes. -+ Tatu +- -- 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.
