Class FindKt
-
- All Implemented Interfaces:
public final class FindKt
-
-
Method Summary
Modifier and Type Method Description final static BooleanexistsIn(JSONPointer $self, JSONValue json)Test whether this JSONPointer references a valid location in the specified base value. final static JSONValuefind(JSONPointer $self, JSONValue base)Find the JSONValue that this JSONPointer points to within the specified base value, or throw an exception if the pointer does not reference a valid location in the base value. final static JSONValuefindOrNull(JSONPointer $self, JSONValue base)Find the JSONValue that this JSONPointer points to within the specified base value, or nullif the pointer does not reference a valid location in the base value.final static JSONObjectfindObject(JSONPointer $self, JSONValue base)Find the JSONObject that this JSONPointer points to within the specified base value, or throw an exception if the pointer does not reference a valid location in the base value or if the value referenced is not a JSONObject. final static JSONArrayfindArray(JSONPointer $self, JSONValue base)Find the JSONArray that this JSONPointer points to within the specified base value, or throw an exception if the pointer does not reference a valid location in the base value or if the value referenced is not a JSONArray. final static JSONPointerlocateChild(JSONPointer $self, JSONValue base, JSONValue target)Locate the specified target JSONValue in the base JSONValue, and return a JSONPointer pointing to it, based on the current pointer. -
-
Method Detail
-
existsIn
final static Boolean existsIn(JSONPointer $self, JSONValue json)
Test whether this JSONPointer references a valid location in the specified base value.
-
find
final static JSONValue find(JSONPointer $self, JSONValue base)
Find the JSONValue that this JSONPointer points to within the specified base value, or throw an exception if the pointer does not reference a valid location in the base value.
-
findOrNull
final static JSONValue findOrNull(JSONPointer $self, JSONValue base)
Find the JSONValue that this JSONPointer points to within the specified base value, or
nullif the pointer does not reference a valid location in the base value.
-
findObject
final static JSONObject findObject(JSONPointer $self, JSONValue base)
Find the JSONObject that this JSONPointer points to within the specified base value, or throw an exception if the pointer does not reference a valid location in the base value or if the value referenced is not a JSONObject.
-
findArray
final static JSONArray findArray(JSONPointer $self, JSONValue base)
Find the JSONArray that this JSONPointer points to within the specified base value, or throw an exception if the pointer does not reference a valid location in the base value or if the value referenced is not a JSONArray.
-
locateChild
final static JSONPointer locateChild(JSONPointer $self, JSONValue base, JSONValue target)
Locate the specified target JSONValue in the base JSONValue, and return a JSONPointer pointing to it, based on the current pointer. Returns
nullif not found.This will perform a depth-first search of the JSON structure.
-
-
-
-