I'm currently using the @JsonIdentityInfo
during deserialization and during serialization at some point in my application (During communication with certain clients) but some of my other clients simply can't use the @JsonIdentityInfo
, is there away of ignoring it during serialization on some methods in spring?
For example:
[{id:5, innerobject:{id:1, name:"inner"}},
{id:6, innerobject:{id:1}}]
The second object with id:6
does not have a full innerobject
, instead it uses the @JsonIdentityInfo
to ignore the rest (As we already have it)
Focussing on the JacksonIdentityInfo (Server side), rather than focussing on the clientside as pointed out in the potential duplicate, which it is not. This is Jackson, not Gson.