json - JAXB A cycle is detected in the object graph -


i want convert pojo json jaxb, pojo have 1 many relation, , when convert pojo json, jaxb generate error "a cycle detected in object graph. cause infinitely deep xml".

i read web that, problem can solved @xmlid , @xmlidref, there 1 problem, id attribute not string type long. , far know @xmlid can used string property.

other web suggest using eclipselink moxy, moxy cannot generate json.

as mentioned in question eclipselink moxy (i'm tech lead) has @xmlinversereference annotation solve problem of bidirectional relationships. of eclipselink 2.4 moxy can produce/consume json.

for more information


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -