505152535455565758596061
return data.toString(); } public static EntityTree toTree(String json) throws IOException { EntityTree temp = new EntityTree("temp"); parseEntity(temp.getRoot(), json); EntityTree result = new EntityTree( temp.getRoot().getChildren().get(0) ); return result; }
6364656667686970
public static String toJSON(Object instance) { return toJSON( JavaTree.toEntityTree(instance) ); } public static Object fromJSON(String json) throws IOException { EntityTree tree = toTree(json); return JavaTree.toObject(tree); }