title: Is there a JSON library that can serialize Proxy objects?
body: <p>Using ActiveObjects as my ORM and Gson as my JSON processor.  </p>
  
  <p>Ran into a problem going toJson from
  persisted objects.  The problem is that my persisted class is actually
  an Interface and AO is proxying that object under the hood.  Here's
  some sample code:</p>
  
  <pre><code>    Venue venue = manager.get(Venue.class, id);
      gson.toJson(venue);
  </code></pre>
  
  <p>Comes up with this exception:</p>
  
  <pre><code>java.lang.UnsupportedOperationException: Expecting parameterized type,
  got interface java.lang.reflect.InvocationHandler.
   Are you missing the use of TypeToken idiom?
   See http://sites.google.com/site/gson/gson-user-guide#TOC-Serializing-and...
  </code></pre>
  
  <p>Because venue.getClass().getName() gives:</p>
  
  <p>$Proxy228</p>
  
  <p>I've tried a few solutions in various combinations:</p>
  
  <pre><code>    gsonBuilder.registerTypeAdapter(Venue.class, newVenueSerializer());
      Type listType = new TypeToken&lt;Venue&gt;() {}.getType();
  </code></pre>
  
  <p>Nothing has worked so far and I'm using a wonky field-by-field workaround.  Any suggestions?  I'm not married to Gson, so if there's an alternative library that can do this I'd be happy to use it.</p>