public void startObject() { if (current == null) { current = new ObjectValue(); values.push(current); return; } ObjectValue o = new ObjectValue(); if (current.isObject()) { current.addElement(key, o); } else if (current.isArray()) { current.addElement(o); } values.push(current); current = o; }
public void startArray() { ArrayValue o = new ArrayValue(); if (current == null) { current = o; } else if (current.isObject()) { current.addElement(key, o); } else if (current.isArray()) { current.addElement(o); } values.push(current); current = o; }
/** Reset JSON events handler and prepare it for next usage. */ public void reset() { current = null; key = null; values.clear(); }
public void endObject() { current = values.pop(); }
public void endArray() { current = values.pop(); }