title: Convert an object to a JSON string with thrift json serialization
body: <p>I'm new to the thrift. I need to convert my data object to a <code>JSON string</code> with <code>Thrift JSON</code> serialization.</p>
  
  <p>I tried in this way.</p>
  
  <pre><code>TSerializer serializer = new TSerializer(new TSimpleJSONProtocol.Factory());
  String json = serializer.toString(object_name);
  </code></pre>
  
  <p>In here is an error, that <code>object_name</code> should be in <code>TBase</code>. How can I resolve this ?</p>