jackson self reference leading to cycle

后端 未结 1 1366
盖世英雄少女心
盖世英雄少女心 2020-12-18 20:35


I have a problem when converting hibernate objects to JSON with Jackson, because some objects have a self-reference in their definition. The problem is that I don\'t

相关标签:
1条回答
  • 2020-12-18 21:25

    Use Jackson 2.0 - it handles cyclic references (with @JsonIdentityInfo annotation)

    If you cannot add annotations directly to the class then use MixIn annotations. An example here: https://github.com/FasterXML/jackson-docs/wiki/JacksonMixInAnnotations

    0 讨论(0)
提交回复
热议问题