Replies: 1 comment 8 replies
-
I wish developers did not add such useless, pointless wrapping. :) Other than that I have tried to limit amount of structural changes Jackson does to sort of minimum... because doing those is fundamentally difficult (or impossible) in incremental/streaming way. But I guess addition of a new Doing this should actually be quite a bit simpler than implementation of |
Beta Was this translation helpful? Give feedback.
-
Hi, recently I had to deal with the JSON objects which treated lists in a special way:
Properties representing collections had an additional indirection level:
After poking around a bit I decided to settle with intermediate objects in my Java model representation as well:
However, my question is: how to manage to represent such JSON i.e. implement serialization-deserialization having a model with the collection properties directly in it?
@WrappedCollection(inner = "Inner", outer = "outer")
at first glance would look sexy, but I have no idea how to even start tackling the implementation so I would definitely ask some guidace on it :)@JsonUnwrapped
handles only deserialization part, unfortunately;@JsonRootName
could only be used on top of classes, but in my case I have lots of generic lists.Beta Was this translation helpful? Give feedback.
All reactions