如何在使用@JsonIdentityInfo时禁用对象引用?

how*_*wie 13 json jackson

嗨,当我使用JsonIdentityInfo时,例如@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class,property ="@ dataSet")

杰克逊将取代看起来像id的对象,如下面的那样.

@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = "@dataSet")
Run Code Online (Sandbox Code Playgroud)

我也试过@JsonIdentityReference(alwaysAsId = true)

此注释强制对象替换为id.但我想禁用替换

我可以禁用此功能而不是用id替换.