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: UseJsonFraminginstead.static byteBackslash()static byteComma()static byteCurlyBraceEnd()static byteCurlyBraceStart()intdepth()static byteDoubleQuote()booleanisEmpty()static booleanisWhitespace(byte b)static intLineBreak()static intLineBreak2()voidoffer(ByteString input)Appends input ByteString to internal byte string buffer.booleanoutsideObject()scala.Option<ByteString>poll()Attempt to locate next complete JSON object in buffered ByteString and returnsSome(it)if found.static intSpace()static byteSquareBraceEnd()static byteSquareBraceStart()static intTab()
-
-
-
Method Detail
-
$lessinit$greater$default$1
public static int $lessinit$greater$default$1()
INTERNAL API: UseJsonFraminginstead.**Mutable** framing implementation that given any number of
ByteStringchunks, 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.
- Returns:
- (undocumented)
-
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.- Parameters:
input- (undocumented)
-
isEmpty
public boolean isEmpty()
-
poll
public scala.Option<ByteString> poll()
Attempt to locate next complete JSON object in buffered ByteString and returnsSome(it)if found. May throw aFraming.FramingExceptionif the contained JSON is invalid or max object size is exceeded.- Returns:
- (undocumented)
-
outsideObject
public final boolean outsideObject()
-
-