code: public static <T extends TBase> String serializeJson(T obj) throws TException {
  		// Tried having a static final serializer, but it doesn't seem to be thread safe
  		return new TSerializer(new TJSONProtocol.Factory()).toString(obj, THRIFT_CHARSET);
  	}
docs: Serialize a JSON-encoded thrift object