I need to serialize/deserialze some xml data like this:
<MyObject>
<MyPropA>1</MyPropA>
<MyPropA>2</MyPropA>
...
<MyPropB>a</MyPropB>
<MyPropB>b</MyPropB>
<MyPropB>c</MyPropB>
...
<MyPropA>3</MyPropA>
<MyPropA>4</MyPropA>
<MyPropA>5</MyPropA>
...
</MyObject>
Where MyPropB has to have at least 1 element! So even for deserialization
it's clear where all the MyPropA items belong to.
This simple approach does (of course) not work:
class MyObject {
@JsonProperty(value = "MyPropA")
private List<String> myPropA1;
@JsonProperty(value = "MyPropB")
private List<String> myPropB;
@JsonProperty(value = "MyPropA")
private List<String> myPropA2;
}
because of the duplicate property name MyPropA.
Any idea how to define/annotate classes to achieve this goal?
--Heiko
--
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.