106107108109110111112113114115116
@Override public JsonNode getChild(final String key) { List<JsonNode> result = getChildren(key); if (result.size()>=2) throw new JsonException("More than one result"); else if (result.isEmpty()) return null; else return result.get(0); }
130131132133134135136137
// if (!isPrimitive(this.obj.get(key))) result.addAll(getChildren(key)); } return result; } catch (Exception e) { throw new JsonException(e); } }
183184185186187188189190
result.add(factory(key, obj, array, i)); } } return result; } catch (JSONException e) { throw new JsonException(e); } }
2021222324252627
protected static JSONObject parseJson(final String json) { try { return new JSONObject(json); } catch (JSONException e) { throw new JsonException(e); } }