/** * Creates a JSONPointer using an initialization string and tries to * match it to an item within this JSONArray. For example, given a * JSONArray initialized with this document: * <pre> * [ * {"b":"c"} * ] * </pre> * and this JSONPointer string: * <pre> * "/0/b" * </pre> * Then this method will return the String "c" * A JSONPointerException may be thrown from code called by this method. * * @param jsonPointer string that can be used to create a JSONPointer * @return the item matched by the JSONPointer, otherwise null */ public Object query(String jsonPointer) { return query(new JSONPointer(jsonPointer)); }
/** * Creates a JSONPointer using an initialization string and tries to * match it to an item within this JSONArray. For example, given a * JSONArray initialized with this document: * <pre> * [ * {"b":"c"} * ] * </pre> * and this JSONPointer string: * <pre> * "/0/b" * </pre> * Then this method will return the String "c" * A JSONPointerException may be thrown from code called by this method. * * @param jsonPointer string that can be used to create a JSONPointer * @return the item matched by the JSONPointer, otherwise null */ public Object query(String jsonPointer) { return query(new JSONPointer(jsonPointer)); }
/** * Creates a JSONPointer using an initialization string and tries to * match it to an item within this JSONArray. For example, given a * JSONArray initialized with this document: * <pre> * [ * {"b":"c"} * ] * </pre> * and this JSONPointer string: * <pre> * "/0/b" * </pre> * Then this method will return the String "c" * A JSONPointerException may be thrown from code called by this method. * * @param jsonPointer string that can be used to create a JSONPointer * @return the item matched by the JSONPointer, otherwise null */ public Object query(String jsonPointer) { return query(new JSONPointer(jsonPointer)); }