@JsonIgnore and @JsonBackReference are being Ignored

后端 未结 6 2122
感情败类
感情败类 2020-12-31 15:13

I\'m working with RestEasy, Jboss 7 and EJB 3.1. I\'m creating a RESTful web service that returns data in JSON format.

The problem is that I have a @ManyToOne<

6条回答
  •  鱼传尺愫
    2020-12-31 16:00

    The problem here seems to be related to using Set instead of List. I had exactly the same problem and changing from Set to List fixed this, otherwise I always got Infinite recursion error from Jackson. I don't know if this is really a bug in Jackson or do you have to provide some other annotations etc. when using Set.

提交回复
热议问题