Jackson JSON serialization, recursion avoidance by level defining

前端 未结 7 1320
庸人自扰
庸人自扰 2020-12-02 20:46

I use Jackson library for serialization of my pojo objects into JSON representation. For example I have class A and class B:

class A {
  privat         


        
7条回答
  •  一整个雨季
    2020-12-02 21:09

    There is no support for level-based ignorals.

    But you can get Jackson to handle cyclic references with 2.0, see for example "Jackson 2.0 released" for explanation on how to use @JsonIdentityInfo.

提交回复
热议问题