public abstract class Json {
public static String toJson(Object obj) {
String ret = null;
JsonWriter writer = null;
try {
writer = new JsonStringWriter();
SerialStateMachine.toJson(obj, writer);
ret = writer.toString();
} catch (IOException e) {
e.printStackTrace();
} finally {