Class PathCapturingJSONWriterWrapper


  • public class PathCapturingJSONWriterWrapper
    extends JSONWriter
    TODO Proof of concept Should capture the JSON Path to the current element
    • Constructor Detail

      • PathCapturingJSONWriterWrapper

        public PathCapturingJSONWriterWrapper​(JSONWriter delegate)
    • Method Detail

      • append

        public JSONWriter append​(java.lang.String s)
        Description copied from class: JSONWriter
        Append a value.
        Overrides:
        append in class JSONWriter
        Parameters:
        s - A string value.
        Returns:
        this
      • array

        public JSONWriter array()
        Description copied from class: JSONWriter
        Begin appending a new array. All values until the balancing endArray will be appended to this array. The endArray method must be called to mark the array's end.
        Overrides:
        array in class JSONWriter
        Returns:
        this
      • endArray

        public JSONWriter endArray()
        Description copied from class: JSONWriter
        End an array. This method most be called to balance calls to array.
        Overrides:
        endArray in class JSONWriter
        Returns:
        this
      • endObject

        public JSONWriter endObject()
        Description copied from class: JSONWriter
        End an object. This method most be called to balance calls to object.
        Overrides:
        endObject in class JSONWriter
        Returns:
        this
      • key

        public JSONWriter key​(java.lang.String s)
        Description copied from class: JSONWriter
        Append a key. The key will be associated with the next value. In an object, every value must be preceded by a key.
        Overrides:
        key in class JSONWriter
        Parameters:
        s - A key string.
        Returns:
        this
      • object

        public JSONWriter object()
        Description copied from class: JSONWriter
        Begin appending a new object. All keys and values until the balancing endObject will be appended to this object. The endObject method must be called to mark the object's end.
        Overrides:
        object in class JSONWriter
        Returns:
        this
      • pop

        public void pop​(JSONWriter.Mode c)
        Description copied from class: JSONWriter
        Pop an array or object scope.
        Overrides:
        pop in class JSONWriter
        Parameters:
        c - The scope to close.
      • push

        public void push​(JSONWriter.Mode c)
        Description copied from class: JSONWriter
        Push an array or object scope.
        Overrides:
        push in class JSONWriter
        Parameters:
        c - The scope to open.
      • value

        public JSONWriter value​(boolean b)
        Description copied from class: JSONWriter
        Append either the value true or the value false.
        Overrides:
        value in class JSONWriter
        Parameters:
        b - A boolean.
        Returns:
        this
      • value

        public JSONWriter value​(double d)
        Description copied from class: JSONWriter
        Append a double value.
        Overrides:
        value in class JSONWriter
        Parameters:
        d - A double.
        Returns:
        this
      • value

        public JSONWriter value​(long l)
        Description copied from class: JSONWriter
        Append a long value.
        Overrides:
        value in class JSONWriter
        Parameters:
        l - A long.
        Returns:
        this
      • value

        public JSONWriter value​(java.lang.Object o)
        Description copied from class: JSONWriter
        Append an object value.
        Overrides:
        value in class JSONWriter
        Parameters:
        o - The object to append. It can be null, or a Boolean, Number, String, JSONObject, or JSONArray.
        Returns:
        this
      • getStackReference

        public java.lang.String getStackReference​(int depth)
      • getCurrentStrackReference

        public java.lang.String getCurrentStrackReference()