949596979899100101
children.add(factory("array", obj, array, i)); } } return children; } catch (JSONException e) { throw new JsonException(e); } }
8081828384858687
else if (obj instanceof JSONArray) throw new JsonArrayException("Can't access a single array entry without index", (JSONArray)obj); else return new AttributeNode(this, key); } catch (JSONException e) { throw new JsonException(e); } }
2829303132333435
@Override public String toString() { try { return new JSONObject().put(name, getValue()).toString(); } catch (JSONException e) { throw new JsonException(e); } }
3738394041424344
@Override public String getValue() { try { return this.array.getString(this.index); } catch (JSONException e) { throw new JsonException(e); } }
4647484950515253
@Override public void setValue(final String value) { try { this.array.put(this.index, value); } catch (JSONException e) { throw new JsonException(e); } }
2627282930313233
5556575859606162
if (value==JSONObject.NULL) return null; return value.toString(); } catch (JSONException e) { throw new JsonException(e); } }
6465666768697071
@Override public void setAttribute(final String key, final String value) { try { obj.put(key, value==null ? JSONObject.NULL : value); } catch (JSONException e) { throw new JsonException(e); } }
8687888990919293
if (isPrimitive(this.obj.get(key))) result.add(key); } return result; } catch (JSONException e) { throw new JsonException(e); } }
979899100101102103
return null; } @Override public void setValue(final String value) { throw new JsonException("JSON Objects can't directly have coSntent"); }