X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=lib%2Fjson%2Forg%2Fjson%2FJSONObject.java;h=091795d0b57cfb286dc05e469598542d71c22813;hb=a57cede7c8b013b2578243c422f903b986ee8bd3;hp=aa227ff0969b93413eaf89bc44d66724c26f59be;hpb=d4c3fe1597460bfe87b9014a85cea596fdac1987;p=gigi.git diff --git a/lib/json/org/json/JSONObject.java b/lib/json/org/json/JSONObject.java index aa227ff0..091795d0 100644 --- a/lib/json/org/json/JSONObject.java +++ b/lib/json/org/json/JSONObject.java @@ -1338,46 +1338,6 @@ public class JSONObject { return this; } - /** - * Creates a JSONPointer using an intialization string and tries to - * match it to an item within this JSONObject. For example, given a - * JSONObject initialized with this document: - *
-     * {
-     *     "a":{"b":"c"}
-     * }
-     * 
- * and this JSONPointer string: - *
-     * "/a/b"
-     * 
- * 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 new JSONPointer(jsonPointer).queryFrom(this); - } - - /** - * Queries and returns a value from this object using {@code jsonPointer}, or - * returns null if the query fails due to a missing key. - * - * @param jsonPointer the string representation of the JSON pointer - * @return the queried value or {@code null} - * @throws IllegalArgumentException if {@code jsonPointer} has invalid syntax - */ - public Object optQuery(String jsonPointer) { - JSONPointer pointer = new JSONPointer(jsonPointer); - try { - return pointer.queryFrom(this); - } catch (JSONPointerException e) { - return null; - } - } - /** * Produce a string in double quotes with backslash sequences in all the * right places. A backslash will be inserted within