Configuration for com.github.plokhotnyuk.jsoniter_scala.core.JsonReader that contains flags for tuning of parsing exceptions and preferred sizes for internal buffers that created on the reader instantiation and reused in runtime for parsing of messages.
Configuration for com.github.plokhotnyuk.jsoniter_scala.core.JsonReader that contains flags for tuning of
parsing exceptions and preferred sizes for internal buffers that created on the reader instantiation and reused in
runtime for parsing of messages.
All configuration params already initialized by recommended default values, but in some cases they should be altered
for performance reasons:
a flag that allows to turn off a stack trace for parsing exceptions
a flag that allows to turn off hex dumping of affected by error part of an internal byte buffer
a preferred size (in bytes) of an internal byte buffer when parsing from java.io.InputStream
a preferred size (in chars) of an internal char buffer for parsing of string values
Configuration for com.github.plokhotnyuk.jsoniter_scala.core.JsonWriter that contains params for formatting of output JSON and for tuning of preferred size for internal byte buffer that created on the writer instantiation and reused in runtime for serialization of messages using java.io.OutputStream.
Configuration for com.github.plokhotnyuk.jsoniter_scala.core.JsonWriter that contains params for formatting of
output JSON and for tuning of preferred size for internal byte buffer that created on the writer instantiation and
reused in runtime for serialization of messages using java.io.OutputStream.
All configuration params already initialized to default values, but in some cases they should be altered:
JsonWriter.writeNonEscapedAsciiKey
or
JsonWriter.writeNonEscapedAsciiVal
a size of indention for pretty-printed formatting or 0 for compact output
a flag to turn on hexadecimal escaping of all non-ASCII chars
a preferred size (in bytes) of an internal byte buffer when writing to java.io.OutputStream
Deserialize JSON content encoded in UTF-8 from a byte array into a value of given A
type
with specified parsing options.
Deserialize JSON content encoded in UTF-8 from a byte array into a value of given A
type
with specified parsing options.
type of the value to parse
the byte array to parse from
a parsing configuration
a codec for the given A
type
a successfully parsed value
JsonParseException
if underlying input contains malformed UTF-8 bytes, invalid JSON content or
the input JSON structure does not match structure that expected for result type,
also in case if end of input is detected while some input bytes are expected
NullPointerException
if the codec
, buf
or config
is null
Deserialize JSON content encoded in UTF-8 from an input stream into a value of given A
type.
Deserialize JSON content encoded in UTF-8 from an input stream into a value of given A
type.
type of the value to parse
the input stream to parse from
a parsing configuration
a codec for the given A
type
a successfully parsed value
JsonParseException
if underlying input contains malformed UTF-8 bytes, invalid JSON content or
the input JSON structure does not match structure that expected for result type,
also if a low-level I/O problem (unexpected end-of-input, network error) occurs
while some input bytes are expected
NullPointerException
if the codec
, in
or config
is null
Deserialize JSON content encoded in UTF-8 from a byte array into a value of given A
type with
specified parsing options or with defaults that maximize description of error.
Deserialize JSON content encoded in UTF-8 from a byte array into a value of given A
type with
specified parsing options or with defaults that maximize description of error.
type of the value to parse
the byte array to parse from
the start position of the provided byte array
the position of end of input in the provided byte array
a parsing configuration
a codec for the given A
type
a successfully parsed value
ArrayIndexOutOfBoundsException
if the to
is greater than buf
length or negative,
or from
is greater than to
or negative
JsonParseException
if underlying input contains malformed UTF-8 bytes, invalid JSON content or
the input JSON structure does not match structure that expected for result type,
also in case if end of input is detected while some input bytes are expected
NullPointerException
if the codec
, buf
or config
is null
Deserialize JSON array encoded in UTF-8 from an input stream into its values of given A
type.
Deserialize JSON array encoded in UTF-8 from an input stream into its values of given A
type.
All parsed values will be passed to consuming function f
.
type of the value to parse
the input stream to parse from
a parsing configuration
a consumer of values, that returns true
to continue scanning or false
to complete it
a codec for the given A
type
a successfully parsed value
JsonParseException
if underlying input contains malformed UTF-8 bytes, invalid JSON content or
the input JSON structure does not match structure that expected for result type,
also if a low-level I/O problem (unexpected end-of-input, network error) occurs
while some input bytes are expected
NullPointerException
if the codec
, in
or config
is null
Throwable
if some error was thrown by f() call
Deserialize JSON of streaming values encoded in UTF-8 from an input stream into values of given A
type.
Deserialize JSON of streaming values encoded in UTF-8 from an input stream into values of given A
type.
All parsed values will be passed to consuming function f
.
type of the value to parse
the input stream to parse from
a parsing configuration
a consumer of values, that returns true
to continue scanning or false
to complete it
a codec for the given A
type
a successfully parsed value
JsonParseException
if underlying input contains malformed UTF-8 bytes, invalid JSON content or
the input JSON structure does not match structure that expected for result type,
also if a low-level I/O problem (unexpected end-of-input, network error) occurs
while some input bytes are expected
NullPointerException
if the codec
, in
or config
is null
Throwable
if some error was thrown by f() call
Serialize the x
argument to a new allocated instance of byte array in UTF-8 encoding of JSON format,
that specified by provided configuration options.
Serialize the x
argument to a new allocated instance of byte array in UTF-8 encoding of JSON format,
that specified by provided configuration options.
type of value to serialize
the value to serialize
a serialization configuration
a codec for the given value
a byte array with x
serialized to JSON
NullPointerException
if the codec
or config
is null
Serialize the x
argument to the given instance of byte array in UTF-8 encoding of JSON format
that specified by provided configuration options or defaults that minimizes output size & time to serialize.
Serialize the x
argument to the given instance of byte array in UTF-8 encoding of JSON format
that specified by provided configuration options or defaults that minimizes output size & time to serialize.
type of value to serialize
the value to serialize
a byte array where the value should be serialized
a position in the byte array from which serialization of the value should start
a serialization configuration
a codec for the given value
number of next position after last byte serialized to buf
ArrayIndexOutOfBoundsException
if the from
is greater than buf
length or negative,
or buf
length was exceeded during serialization
NullPointerException
if the codec
, buf
or config
is null
Serialize the x
argument to the provided output stream in UTF-8 encoding of JSON format
that specified by provided configuration options.
Serialize the x
argument to the provided output stream in UTF-8 encoding of JSON format
that specified by provided configuration options.
type of value to serialize
the value to serialize
an output stream to serialize into
a serialization configuration
a codec for the given value
NullPointerException
if the codec
, out
or config
is null