How to use @JsonIdentityInfo with circular references?

后端 未结 3 1930
小鲜肉
小鲜肉 2020-12-03 05:47

I am trying to use the @JsonIdentityInfo from Jackson 2 as described here.

For testing purposes I created the following two classes:

public class A
{         


        
3条回答
  •  旧巷少年郎
    2020-12-03 06:44

    In some cases, it can be necessary to annotate the Id Property with @JsonProperty("id")

    For example, in my case, this made my application run correctly.

提交回复
热议问题