2017-11-02 13 views
0

ChildからParent(JsonManagedReference - > JsonBackReference)までシリアル化できますが、Parent - > childでは機能しません。両方向でJsonManagedReferenceとJsonBackReferenceを使用する方法はありますか?

これを行う方法はありますか?

また、JsonIdentityInfoで試しました。ここでは、同じIDを持つ2つのオブジェクトを含むJsonを逆シリアル化できません。 I質問作成した:、試みの多く後

Unable to deserialize JSON with same ID

+0

1つのオプションは、異なるミックスインを持つ複数のオブジェクトマッパーを使用することですが、読んだり維持するのは難しいと思います。 – varren

答えて

0

を@JsonIgnoreProperties

例を横切る双方向の実装: "@JsonIgnoreProperties(allowSetters =真、値= {" エンタープライズ"})"

関連する問題