Class ParseEvent


  • public class ParseEvent
    extends Object
    Describes the completion of an entire 'leaf' in json. It basically wraps a Path with (optionally) its value
    Since:
    0.4
    Author:
    Michiel Meeuwissen
    • Constructor Detail

      • ParseEvent

        public ParseEvent​(com.fasterxml.jackson.core.JsonToken token,
                          Path path,
                          String value)
      • ParseEvent

        public ParseEvent​(com.fasterxml.jackson.core.JsonToken token,
                          Path path,
                          String value,
                          List<String> keys)
      • ParseEvent

        public ParseEvent​(com.fasterxml.jackson.core.JsonToken token,
                          Path path,
                          String value,
                          List<String> keys,
                          Object node)
    • Method Detail

      • toGenerator

        public void toGenerator​(com.fasterxml.jackson.core.JsonGenerator generator)
                         throws IOException
        Throws:
        IOException
      • valueOrNodeAsString

        public String valueOrNodeAsString()
        Returns the value associated with this event as a string.
        Returns:
        The value as a string if it is a simple value. Or, if this leaf represents an object or an array, a complete json representation of it as a string.
      • valueOrNodeAsConciseString

        public String valueOrNodeAsConciseString()
        Returns:
        The value as a string if it is a simple value. Or, if this leaf represents an object or an array, either '{...}' or '[...]'