When trying to convert a JPA object that has a bi-directional association into JSON, I keep getting
org.codehaus.jackson.map.JsonMappingException: Infinite
You may use @JsonIgnore to break the cycle (reference).
@JsonIgnore
You need to import org.codehaus.jackson.annotate.JsonIgnore (legacy versions) or com.fasterxml.jackson.annotation.JsonIgnore (current versions).
org.codehaus.jackson.annotate.JsonIgnore
com.fasterxml.jackson.annotation.JsonIgnore