Class JsonObjectParser

  • public class JsonObjectParser
    extends java.lang.Object
    • Constructor Detail

      • JsonObjectParser

        public JsonObjectParser​(int maximumObjectLength)
    • Method Detail

      • $lessinit$greater$default$1

        public static int $lessinit$greater$default$1()
        INTERNAL API: Use JsonFraming instead.

        **Mutable** framing implementation that given any number of ByteString chunks, can emit JSON objects contained within them. Typically JSON objects are separated by new-lines or commas, however a top-level JSON Array can also be understood and chunked up into valid JSON objects by this framing implementation.

        Leading whitespace between elements will be trimmed.

      • SquareBraceStart

        public static final byte SquareBraceStart()
      • SquareBraceEnd

        public static final byte SquareBraceEnd()
      • CurlyBraceStart

        public static final byte CurlyBraceStart()
      • CurlyBraceEnd

        public static final byte CurlyBraceEnd()
      • DoubleQuote

        public static final byte DoubleQuote()
      • Backslash

        public static final byte Backslash()
      • Comma

        public static final byte Comma()
      • LineBreak

        public static final int LineBreak()
      • LineBreak2

        public static final int LineBreak2()
      • Tab

        public static final int Tab()
      • Space

        public static final int Space()
      • isWhitespace

        public static boolean isWhitespace​(byte b)
      • depth

        public int depth()
      • offer

        public void offer​(ByteString input)
        Appends input ByteString to internal byte string buffer. Use poll() to extract contained JSON objects.
      • isEmpty

        public boolean isEmpty()
      • poll

        public scala.Option<ByteString> poll()
        Attempt to locate next complete JSON object in buffered ByteString and returns Some(it) if found. May throw a Framing.FramingException if the contained JSON is invalid or max object size is exceeded.
      • outsideObject

        public final boolean outsideObject()