Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
package com.marginallyclever.makelangelo.donatelloimpl.nodes;
import com.marginallyclever.makelangelo.turtle.Turtle;
import com.marginallyclever.nodegraphcore.DAO4JSON;
import org.json.JSONException;
import org.json.JSONObject;
public class TurtleDAO4JSON implements DAO4JSON<Turtle> {
@Override
public Object toJSON(Object object) throws JSONException {
JSONObject json = new JSONObject();
Turtle turtle = (Turtle)object;
// for a complete snapshot, capture all the instance details, too.
return json;
}
@Override
public Turtle fromJSON(Object object) throws JSONException {
JSONObject json = (JSONObject)object;
// for a complete snapshot, restore all the instance details, too.
return new Turtle();
}
}
9e679da90This file is pinned to the selected release. Download the original to open it in your design tool.