I just recently upgraded to Jackson 2.0.5 and discovered this new attribute called @JsonIdentityInfo that allows you do define an object once, but then have the serializer create references to that single object, without creating duplicates every time its seen. Quite nice actually. http://wiki.fasterxml.com/JacksonFeatureObjectIdentity
The documentation states that this feature does not yet currently support arrays. I was wondering if anyone knows of any other approach to this? I have a snippet of JSON that might look like this:
{
"people":[
{ "@id" = 1, "name"="bill"},
{ "@id" = 2, "name"="joe"}
],
"friends": [1,2]
}
I'd like to have "friends" inflate with the array of "person" objects, in the same way that "people" will. Does anyone know of a way to do this?