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 on a stack traces for debugging purposes in development
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
a flag to check and raise an error if some non whitespace bytes will be detected after successful parsing of the value
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 is created on the writer instantiation and reused in runtime for serialization of messages using java.io.OutputStream or java.nio.DirectByteBuffer.
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 is created on the writer instantiation
and reused in runtime for serialization of messages using java.io.OutputStream or java.nio.DirectByteBuffer.
All configuration params already initialized to default values, but in some cases they should be altered:
JsonWriter.writeNonEscapedAsciiKey
or JsonWriter.writeNonEscapedAsciiVal
a flag that allows to turn on a stack traces for debugging purposes in development
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 or java.nio.DirectByteBuffer
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
JsonReaderException
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
java.lang.NullPointerException
if the codec
, buf
or config
is null
Deserialize JSON content encoded in UTF-8 from a byte buffer 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 buffer into a value of given A
type with
specified parsing options or with defaults that maximize description of error.
Parsing will start from the current position and will continue until the limit of the provided byte buffer or the value will be parsed before reaching of the limit. In any case the buffer position will be set to the next position after the last read byte.
type of the value to parse
the byte buffer which will be parsed
a parsing configuration
a codec for the given A
type
a successfully parsed value
JsonReaderException
if underlying input contains malformed UTF-8 bytes, invalid JSON content or
the input JSON structure does not match structure that expected for the result type,
also in case if end of input is detected while some input bytes are expected
java.lang.NullPointerException
if the codec
, bbuf
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
JsonReaderException
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
java.lang.NullPointerException
if the codec
, in
or config
is null
Deserialize JSON content from a string into a value of given A
type with
specified parsing options or with defaults that maximize description of error.
Deserialize JSON content from a string into a value of given A
type with
specified parsing options or with defaults that maximize description of error.
While it much less efficient than parsing from a byte array using pooled readers but it can be safely used internally in custom codecs.
type of the value to parse
a value of string which will be parsed
a parsing configuration
a codec for the given A
type
a successfully parsed value
JsonReaderException
if underlying input contains invalid JSON content or the input JSON structure does not
match structure that expected for the result type, also in case if end of input is
detected while some input characters are expected
java.lang.NullPointerException
if the codec
, s
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
JsonReaderException
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
java.lang.ArrayIndexOutOfBoundsException
if the to
is greater than buf
length or negative,
or from
is greater than to
or negative
java.lang.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
JsonReaderException
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
java.lang.NullPointerException
if the codec
, in
or config
is null
java.lang.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
JsonReaderException
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
java.lang.NullPointerException
if the codec
, in
or config
is null
java.lang.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
JsonWriterException
if the value to serialize contains strings, double or float values which cannot be
properly encoded
java.lang.NullPointerException
if the codec
or config
is null
Serialize the x
argument to the given instance of byte buffer 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 buffer in UTF-8 encoding of JSON format
that specified by provided configuration options or defaults that minimizes output size & time to serialize.
Serialization will start from the current position up to the provided byte buffer limit. On return the byte buffer will has position set to the next position after the last written byte.
type of value to serialize
the value to serialize
a byte buffer where the value should be serialized
a serialization configuration
a codec for the given value
JsonWriterException
if the value to serialize contains strings, double or float values which cannot be
properly encoded
java.lang.NullPointerException
if the codec
, bbuf
or config
is null
java.nio.BufferOverflowException
if the bbuf
limit was exceeded during serialization
java.nio.ReadOnlyBufferException
if the bbuf
is read-only
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
JsonWriterException
if the value to serialize contains strings, double or float values which cannot be
properly encoded
java.io.IOException
if an I/O error occurs in a call to output stream
java.lang.NullPointerException
if the codec
, out
or config
is null
Serialize the x
argument to a string in JSON format, that specified by provided configuration options.
Serialize the x
argument to a string in JSON format, that specified by provided configuration options.
While it much less efficient than serialization to a byte array using pooled writers but it can be safely used internally in custom codecs.
type of value to serialize
the value to serialize
a serialization configuration
a codec for the given value
a string with x
serialized to JSON
JsonWriterException
if the value to serialize contains strings, double or float values which cannot be
properly encoded
java.lang.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
an exclusive position in the byte array that limits where serialization of the value should stop
a serialization configuration
a codec for the given value
number of next position after last byte serialized to buf
JsonWriterException
if the value to serialize contains strings, double or float values which cannot be
properly encoded
java.lang.ArrayIndexOutOfBoundsException
if the from
is greater than to
or negative, if 'to' is greater
than buf
length or to
limit was exceeded during serialization
java.lang.NullPointerException
if the codec
, buf
or config
is null