예제 #1
0
 public void characters(char[] characters) {
   if (current.isObject()) {
     current.addElement(key, parseCharacters(characters));
   } else if (current.isArray()) {
     current.addElement(parseCharacters(characters));
   }
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }