*
* @return JSON object with field values added
* @throws JSONException
*/
public JSONObject getJSON() throws JSONException {
JSONObject jsonObject = super.getJSON(new JSONObject());
jsonObject.put("p0", p0);
for (int i = 0; i < points.size(); i++) {
jsonObject.put("x" + i, points.get(i)[0][0]);
jsonObject.put("y" + i, points.get(i)[0][1]);
}
return jsonObject;
}