Package akka.stream.impl
Class JsonObjectParser
- java.lang.Object
-
- akka.stream.impl.JsonObjectParser
-
public class JsonObjectParser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JsonObjectParser(int maximumObjectLength)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
$lessinit$greater$default$1()
INTERNAL API: UseJsonFraming
instead.static byte
Backslash()
boolean
canComplete()
`true` if the buffer is in a valid state to end framing.static byte
Comma()
static byte
CurlyBraceEnd()
static byte
CurlyBraceStart()
int
depth()
static byte
DoubleQuote()
boolean
isEmpty()
static boolean
isWhitespace(byte b)
static int
LineBreak()
static int
LineBreak2()
void
offer(ByteString input)
Appends input ByteString to internal byte string buffer.boolean
outsideObject()
scala.Option<ByteString>
poll()
Attempt to locate next complete JSON object in buffered ByteString and returnsSome(it)
if found.static int
Space()
static byte
SquareBraceEnd()
static byte
SquareBraceStart()
static int
Tab()
-
-
-
Method Detail
-
$lessinit$greater$default$1
public static int $lessinit$greater$default$1()
INTERNAL API: UseJsonFraming
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. Usepoll()
to extract contained JSON objects.
-
isEmpty
public boolean isEmpty()
-
canComplete
public boolean canComplete()
`true` if the buffer is in a valid state to end framing.
-
poll
public scala.Option<ByteString> poll()
Attempt to locate next complete JSON object in buffered ByteString and returnsSome(it)
if found. May throw aFraming.FramingException
if the contained JSON is invalid or max object size is exceeded.
-
outsideObject
public final boolean outsideObject()
-
-