Open gapag opened 2 years ago
Yes, XML backend has some oddities and can not -- for example -- necessarily handle Map
s or Collection
s given that XML lacks such type constructs at token level. At databinding level it can use target type information to handle wrapping of lists (or not); at streaming level not.
Code you have will not work: you cannot read token stream as List
s or Map
s at streaming level when working with XML. This is a fundamental limitation.
So basically you can not really make this code work without special handling for XML use case.
Using gradle, I include:
Problem
@JsonDeserialize
and@JsonSerialize
usingconverter=
Test code
Files written
input.xml
input.json
Stdout
Observations
seq={}
, instead should be same as second line).SeqL2M::convert
3 times<seq>
SeqL2M::convert
only once.