A writer for iterative serialization of JSON keys and values.
Value parameters
- bbuf
-
a byte buffer for writing JSON data
- buf
-
an internal buffer for writing JSON data
- comma
-
a flag indicating if the next element should be preceded by comma
- config
-
a writer configuration
- count
-
the current position in the internal buffer
- disableBufGrowing
-
a flag indicating if growing of the internal buffer is disabled
- indention
-
the current indention level
- limit
-
the last position in the internal buffer
- out
-
the output stream for writing JSON data
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Throws a JsonWriterException with the given error message.
Throws a JsonWriterException with the given error message.
Value parameters
- msg
-
the error message
Attributes
- Throws
-
JsonWriterException
always
Writes a JSON array end marker (]
).
Writes a JSON array end marker (]
).
Attributes
Writes a JSON array start marker ([
).
Writes a JSON array start marker ([
).
Attributes
Writes a byte array as a JSON hexadecimal string value.
Writes a byte array as a JSON hexadecimal string value.
Value parameters
- bs
-
the byte array to write
- lowerCase
-
if
true
, outputs lowercase hexadecimal digits
Attributes
Writes a byte array as a JSON string value encoded in a base-64 format for URLs.
Writes a byte array as a JSON string value encoded in a base-64 format for URLs.
Value parameters
- bs
-
the byte array to write
- doPadding
-
if
true
, outputs padding characters (=
) as needed
Attributes
Writes a byte array as a JSON string value encoded in a base-64 format.
Writes a byte array as a JSON string value encoded in a base-64 format.
Value parameters
- bs
-
the byte array to write
- doPadding
-
if
true
, outputs padding characters (=
) as needed
Attributes
Writes a Boolean
value as a JSON key.
Writes a Boolean
value as a JSON key.
Value parameters
- x
-
the
Boolean
value to write
Attributes
Writes a Byte
value as a JSON key.
Writes a Byte
value as a JSON key.
Value parameters
- x
-
the
Byte
value to write
Attributes
Writes a Char
value as a JSON key.
Writes a Char
value as a JSON key.
Value parameters
- x
-
the
Char
value to write
Attributes
- Throws
-
JsonWriterException
in case of
Char
value is a part of surrogate pair
Writes a Short
value as a JSON key.
Writes a Short
value as a JSON key.
Value parameters
- x
-
the
Short
value to write
Attributes
Writes a Int
value as a JSON key.
Writes a Int
value as a JSON key.
Value parameters
- x
-
the
Int
value to write
Attributes
Writes a Long
value as a JSON key.
Writes a Long
value as a JSON key.
Value parameters
- x
-
the
Long
value to write
Attributes
Writes a Float
value as a JSON key.
Writes a Float
value as a JSON key.
Value parameters
- x
-
the
Float
value to write
Attributes
- Throws
-
JsonWriterException
if the value is non-finite
Writes a Double
value as a JSON key.
Writes a Double
value as a JSON key.
Value parameters
- x
-
the
Double
value to write
Attributes
- Throws
-
JsonWriterException
if the value is non-finite
Writes a BigInt
value as a JSON key.
Writes a BigInt
value as a JSON key.
Value parameters
- x
-
the
BigInt
value to write
Attributes
Writes a BigDecimal
value as a JSON key.
Writes a BigDecimal
value as a JSON key.
Value parameters
- x
-
the
BigDecimal
value to write
Attributes
Writes a java.util.UUID value as a JSON key.
Writes a java.util.UUID value as a JSON key.
Value parameters
- x
-
the java.util.UUID value to write
Attributes
Writes a String
value as a JSON key.
Writes a String
value as a JSON key.
Value parameters
- x
-
the
String
value to write
Attributes
- Throws
-
JsonWriterException
if the provided string has an illegal surrogate pair
Writes a java.time.Duration value as a JSON key.
Writes a java.time.Duration value as a JSON key.
Value parameters
- x
-
the java.time.Duration value to write
Attributes
Writes a java.time.Duration value as a JSON key.
Writes a java.time.Duration value as a JSON key.
Value parameters
- x
-
the java.time.Duration value to write
Attributes
Writes a java.time.LocalDate value as a JSON key.
Writes a java.time.LocalDate value as a JSON key.
Value parameters
- x
-
the java.time.LocalDate value to write
Attributes
Writes a java.time.LocalDateTime value as a JSON key.
Writes a java.time.LocalDateTime value as a JSON key.
Value parameters
- x
-
the java.time.LocalDateTime value to write
Attributes
Writes a java.time.LocalTime value as a JSON key.
Writes a java.time.LocalTime value as a JSON key.
Value parameters
- x
-
the java.time.LocalTime value to write
Attributes
Writes a java.time.MonthDay value as a JSON key.
Writes a java.time.MonthDay value as a JSON key.
Value parameters
- x
-
the java.time.MonthDay value to write
Attributes
Writes a java.time.OffsetDateTime value as a JSON key.
Writes a java.time.OffsetDateTime value as a JSON key.
Value parameters
- x
-
the java.time.OffsetDateTime value to write
Attributes
Writes a java.time.OffsetTime value as a JSON key.
Writes a java.time.OffsetTime value as a JSON key.
Value parameters
- x
-
the java.time.OffsetTime value to write
Attributes
Writes a java.time.Period value as a JSON key.
Writes a java.time.Period value as a JSON key.
Value parameters
- x
-
the java.time.Period value to write
Attributes
Writes a java.time.Year value as a JSON key.
Writes a java.time.Year value as a JSON key.
Value parameters
- x
-
the java.time.Year value to write
Attributes
Writes a java.time.YearMonth value as a JSON key.
Writes a java.time.YearMonth value as a JSON key.
Value parameters
- x
-
the java.time.YearMonth value to write
Attributes
Writes a java.time.ZonedDateTime value as a JSON key.
Writes a java.time.ZonedDateTime value as a JSON key.
Value parameters
- x
-
the java.time.ZonedDateTime value to write
Attributes
Writes a java.time.ZoneId value as a JSON key.
Writes a java.time.ZoneId value as a JSON key.
Value parameters
- x
-
the java.time.ZoneId value to write
Attributes
Writes a java.time.ZoneOffset value as a JSON key.
Writes a java.time.ZoneOffset value as a JSON key.
Value parameters
- x
-
the java.time.ZoneOffset value to write
Attributes
Writes a String
value that doesn't require encoding or escaping as a JSON key.
Writes a String
value that doesn't require encoding or escaping as a JSON key.
Value parameters
- x
-
the
String
value to write
Attributes
- Note
-
Use JsonWriter.isNonEscapedAscii for validation if the string is eligable for writing by this method.
Writes a String
value that doesn't require encoding or escaping as a JSON value.
Writes a String
value that doesn't require encoding or escaping as a JSON value.
Value parameters
- x
-
the
String
value to write
Attributes
- Note
-
Use JsonWriter.isNonEscapedAscii for validation if the string is eligable for writing by this method.
Writes a JSON null
value.
Writes a JSON null
value.
Attributes
Writes a JSON array end marker (}
).
Writes a JSON array end marker (}
).
Attributes
Writes a JSON array start marker ({
).
Writes a JSON array start marker ({
).
Attributes
Writes a byte array as a JSON raw binary value.
Writes a byte array as a JSON raw binary value.
Value parameters
- bs
-
the byte array to write
Attributes
Writes a BigDecimal
value as a JSON value.
Writes a BigDecimal
value as a JSON value.
Value parameters
- x
-
the
BigDecimal
value to write
Attributes
Writes a BigInt
value as a JSON value.
Writes a BigInt
value as a JSON value.
Value parameters
- x
-
the
BigInt
value to write
Attributes
Writes a java.util.UUID value as a JSON value.
Writes a java.util.UUID value as a JSON value.
Value parameters
- x
-
the java.util.UUID value to write
Attributes
Writes a String
value as a JSON value.
Writes a String
value as a JSON value.
Value parameters
- x
-
the
String
value to write
Attributes
- Throws
-
JsonWriterException
if the provided string has an illegal surrogate pair
Writes a java.time.Duration value as a JSON value.
Writes a java.time.Duration value as a JSON value.
Value parameters
- x
-
the java.time.Duration value to write
Attributes
Writes a java.time.Instant value as a JSON value.
Writes a java.time.Instant value as a JSON value.
Value parameters
- x
-
the java.time.Instant value to write
Attributes
Writes a java.time.LocalDate value as a JSON value.
Writes a java.time.LocalDate value as a JSON value.
Value parameters
- x
-
the java.time.LocalDate value to write
Attributes
Writes a java.time.LocalDateTime value as a JSON value.
Writes a java.time.LocalDateTime value as a JSON value.
Value parameters
- x
-
the java.time.LocalDateTime value to write
Attributes
Writes a java.time.LocalTime value as a JSON value.
Writes a java.time.LocalTime value as a JSON value.
Value parameters
- x
-
the java.time.LocalTime value to write
Attributes
Writes a java.time.MonthDay value as a JSON value.
Writes a java.time.MonthDay value as a JSON value.
Value parameters
- x
-
the java.time.MonthDay value to write
Attributes
Writes a java.time.OffsetDateTime value as a JSON value.
Writes a java.time.OffsetDateTime value as a JSON value.
Value parameters
- x
-
the java.time.OffsetDateTime value to write
Attributes
Writes a java.time.OffsetTime value as a JSON value.
Writes a java.time.OffsetTime value as a JSON value.
Value parameters
- x
-
the java.time.OffsetTime value to write
Attributes
Writes a java.time.Period value as a JSON value.
Writes a java.time.Period value as a JSON value.
Value parameters
- x
-
the java.time.Period value to write
Attributes
Writes a java.time.Year value as a JSON value.
Writes a java.time.Year value as a JSON value.
Value parameters
- x
-
the java.time.Year value to write
Attributes
Writes a java.time.YearMonth value as a JSON value.
Writes a java.time.YearMonth value as a JSON value.
Value parameters
- x
-
the java.time.YearMonth value to write
Attributes
Writes a java.time.ZonedDateTime value as a JSON value.
Writes a java.time.ZonedDateTime value as a JSON value.
Value parameters
- x
-
the java.time.ZonedDateTime value to write
Attributes
Writes a java.time.ZoneId value as a JSON value.
Writes a java.time.ZoneId value as a JSON value.
Value parameters
- x
-
the java.time.ZoneId value to write
Attributes
Writes a java.time.ZoneOffset value as a JSON value.
Writes a java.time.ZoneOffset value as a JSON value.
Value parameters
- x
-
the java.time.ZoneOffset value to write
Attributes
Writes a Boolean
value as a JSON value.
Writes a Boolean
value as a JSON value.
Value parameters
- x
-
the
Boolean
value to write
Attributes
Writes a Byte
value as a JSON value.
Writes a Byte
value as a JSON value.
Value parameters
- x
-
the
Byte
value to write
Attributes
Writes a Short
value as a JSON value.
Writes a Short
value as a JSON value.
Value parameters
- x
-
the
Short
value to write
Attributes
Writes a Char
value as a JSON key.
Writes a Char
value as a JSON key.
Value parameters
- x
-
the
Char
value to write
Attributes
- Throws
-
JsonWriterException
in case of
Char
value is a part of surrogate pair
Writes a Int
value as a JSON value.
Writes a Int
value as a JSON value.
Value parameters
- x
-
the
Int
value to write
Attributes
Writes a Long
value as a JSON value.
Writes a Long
value as a JSON value.
Value parameters
- x
-
the
Long
value to write
Attributes
Writes a Float
value as a JSON value.
Writes a Float
value as a JSON value.
Value parameters
- x
-
the
Float
value to write
Attributes
- Throws
-
JsonWriterException
if the value is non-finite
Writes a Double
value as a JSON value.
Writes a Double
value as a JSON value.
Value parameters
- x
-
the
Double
value to write
Attributes
- Throws
-
JsonWriterException
if the value is non-finite
Writes a BigDecimal
value as a JSON string value.
Writes a BigDecimal
value as a JSON string value.
Value parameters
- x
-
the
BigDecimal
value to write
Attributes
Writes a BigInt
value as a JSON string value.
Writes a BigInt
value as a JSON string value.
Value parameters
- x
-
the
BigInt
value to write
Attributes
Writes a Boolean
value as a JSON string value.
Writes a Boolean
value as a JSON string value.
Value parameters
- x
-
the
Boolean
value to write
Attributes
Writes a Byte
value as a JSON string value.
Writes a Byte
value as a JSON string value.
Value parameters
- x
-
the
Byte
value to write
Attributes
Writes a Short
value as a JSON string value.
Writes a Short
value as a JSON string value.
Value parameters
- x
-
the
Short
value to write
Attributes
Writes a Int
value as a JSON string value.
Writes a Int
value as a JSON string value.
Value parameters
- x
-
the
Int
value to write
Attributes
Writes a Long
value as a JSON string value.
Writes a Long
value as a JSON string value.
Value parameters
- x
-
the
Long
value to write
Attributes
Writes a Float
value as a JSON string value.
Writes a Float
value as a JSON string value.
Value parameters
- x
-
the
Float
value to write
Attributes
- Throws
-
JsonWriterException
if the value is non-finite
Writes a Double
value as a JSON string value.
Writes a Double
value as a JSON string value.
Value parameters
- x
-
the
Double
value to write
Attributes
- Throws
-
JsonWriterException
if the value is non-finite