List of usage examples for com.badlogic.gdx.utils Json toJson
public void toJson(Object object, Class knownType, Writer writer)
From source file:com.bladecoder.engine.ui.Recorder.java
License:Apache License
public void save() { Json json = new Json(); // String s = json.prettyPrint(list); String s = json.toJson(list, ArrayList.class, TimeVerb.class); Writer w = EngineAssetManager.getInstance().getUserFile(fileName + RECORD_EXT).writer(false, "UTF-8"); try {/*from w ww. jav a 2 s .c o m*/ w.write(s); w.close(); } catch (IOException e) { EngineLogger.error("ERROR SAVING RECORD", e); } }