Object obj = node.get(key);
if (obj instanceof JSONObject)
return new ObjectNodeImpl(this, key, (JSONObject)obj);
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);
}