JSON Jackson Shared references JSON Jackson Shared references json json

JSON Jackson Shared references


Well time passed and Jackson 2.0 is out. Here is the requested feature ! I answer this so people like me coming after know its available

https://github.com/FasterXML/jackson-docs/wiki/Presentation-Jackson-2.0


Currently (1.9) you would have to write custom serializer, deserializer, to handle this. There is no out-of-the-box support for handling object identity.

Of Java frameworks the only one that I know to support object identities is XStream.

For what it is worth, there is a long-standing feature request for Jackson to add support. And there is reasonable chance this gets worked on for 2.0. But even if it will be, it'll take a while (a month or two).

UPDATE (April 2013): As per the other accepted answer, this feature -- @JsonIdentityInfo -- was indeed included in Jackson 2.0, and is available. No need for custom (de)serializers.