Class FindKt

  • All Implemented Interfaces:

    
    public final class FindKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Boolean existsIn(JSONPointer $self, JSONValue json) Test whether this JSONPointer references a valid location in the specified base value.
      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.
      final static JSONValue findOrNull(JSONPointer $self, JSONValue base) Find the JSONValue that this JSONPointer points to within the specified base value, or null if the pointer does not reference a valid location in the base value.
      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.
      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.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 null if 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 null if not found.

        This will perform a depth-first search of the JSON structure.