XmlAdapters on Collections cause generated JSON to be invalid

6 views
Skip to first unread message

David Driver

unread,
Dec 14, 2018, 4:38:22 AM12/14/18
to jackson-user
Hi,

We are currently adapting a library based on XML messages to JSON. To ease ourselves in we are trying to piggy back off the XML annotations as much as possible and minise the number of mixins that need to be created.

We are running into a problem with collections, specificly those that have an attached xml adapter. The attached test demonstrates the problem. The class being serialized has four lists. The generic list is there as a base line, we haven't encountered it as a use case. We would expect the other three lists to produce the same output, but they don't. The adapted list, which is the main use case, gives the same output as the generic list. The other adapted list ends up lossing all the details from the contained elements. Only the list without an adpater outputs everything.

We are currently using version 2.8.6.

  • Has this been fixed in a newer version?
  • If not, what are the technical limitations behind this issue?

Cheers
David
JsonCollectionTest.java
output.log
Reply all
Reply to author
Forward
0 new messages