title: Getting JSON from Jersey with circular dependencies
body: <p>I am writing a service that uses Jersey and JAXB. My classes are annotated with @XMLRootElement, @XMLElement, etc. I have a circular dependency between two classes, so I have annotated the circular dependent property with @XMLTransient. So when I call my service I get xml as the default, which works perfectly. However, when I try using JSON, I get repeated lines like:</p>
  
  <p>{"name":"dere","entries":[{"points":0,"wins":0,"losses":0,"ties":0,"leaderboard":{"name":"dere","entries":[{"points":0,"wins":0,"losses":0,"ties":0,"leaderboard":{"name":"dere","entries":[{"points":0,"wins":0,"losses":0,"ties":0,"leaderboard":{"name":"dere","entries":[{"points":0,"wins":0,"losses":0,"ties":0,"leaderboard":{"name":"dere"," ... etc.</p>
  
  <p>So it seems there is a problem with circular dependencies when I am using JSON. I would like to avoid the circular dependent item from showing up in the JSON output, like it is done in XML (because of the @XMLTransient annotation).</p>
  
  <p>Can anyone provide any insight on how I would be able to achieve this?</p>