So I am working on a RESTful data API using Java, Hibernate, JPA annotations, JAX-RS annotations, JAXB annotations, Jersey, and the Jackson JSON parser.
After trying
Jackson 1.x does not have specific support for resolving cyclic references, but there is support for handling parent/child style dependencies: this blog entry has more info.
Jackson 2.0 will have support for arbitrary Object Id / reference handling, using new @JsonIdentityInfo
annotation, so perhaps that could be used to solve the problem. Official 2.0 release is not out yet, but release candidates (latest being RC2) are, in case you wanted to have a look. Not sure if it would handle your problem, but maybe it would help.
EDIT: Actually, Jackson JAXB annotation module will have support for @XmlID
/ @XmlIDREF
for 2.0.0 -- this was just implemented, see here.