My question is similar to deserialize Jackson object in JavaScript containing JsonIdentityInfo but I'm working with Java and I'm asking about jackson specifically, not 3rd party stuff.
I'm sending JSON from the server to the client. To save space I'm using @JsonIdentityInfo
and the client receives:
[
{
"id": 1,
"nestedObject": {
"id": 2,
"someInt": 2,
"someString": "a"
}
},
{
"id": 3,
"nestedObject": 2
}
]
But the client needs the real/full JSON representation because it's working with parsers which are not JsonIdentityInfo-aware. Does Jackson have a way to "halfway deserialize" the compact representation into the full representation?
[
{
"id": 1,
"nestedObject": {
"id": 2,
"someInt": 2,
"someString": "a"
}
},
{
"id": 3,
"nestedObject": {
"id": 2,
"someInt": 2,
"someString": "a"
}
}
]