JsonWriter

zio.blocks.schema.json.JsonWriter
See theJsonWriter companion object
final class JsonWriter

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 comma should precede the next element

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

maxTop

a maximum offset of the stack top

out

the output stream for writing JSON data

stack

a pre-allocated stack of registers

top

an offset of the stack top

Attributes

Companion
object
Source
JsonWriter.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def pop(offset: RegisterOffset): Unit

Attributes

Source
JsonWriter.scala

Attributes

Source
JsonWriter.scala

Attributes

Source
JsonWriter.scala
def writeArrayEnd(): Unit

Writes a JSON array end marker (]).

Writes a JSON array end marker (]).

Attributes

Source
JsonWriter.scala
def writeArrayStart(): Unit

Writes a JSON array start marker ([).

Writes a JSON array start marker ([).

Attributes

Source
JsonWriter.scala
def writeKey(x: Boolean): Unit

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

Source
JsonWriter.scala
def writeKey(x: Byte): Unit

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

Source
JsonWriter.scala
def writeKey(x: Char): Unit

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
JsonCodecError

in the case of Char value is a part of the surrogate pair

Source
JsonWriter.scala
def writeKey(x: Short): Unit

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

Source
JsonWriter.scala
def writeKey(x: Int): Unit

Writes an Int value as a JSON key.

Writes an Int value as a JSON key.

Value parameters

x

the Int value to write

Attributes

Source
JsonWriter.scala
def writeKey(x: Long): Unit

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

Source
JsonWriter.scala
def writeKey(x: Float): Unit

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
JsonCodecError

if the value is non-finite

Source
JsonWriter.scala
def writeKey(x: Double): Unit

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
JsonCodecError

if the value is non-finite

Source
JsonWriter.scala
def writeKey(x: BigInt): Unit

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

Source
JsonWriter.scala
def writeKey(x: BigDecimal): Unit

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

Source
JsonWriter.scala
def writeKey(x: UUID): Unit

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

Source
JsonWriter.scala
def writeKey(x: String): Unit

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
JsonCodecError

if the provided string has an illegal surrogate pair

Source
JsonWriter.scala
def writeKey(x: Duration): Unit

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

Source
JsonWriter.scala
def writeKey(x: Instant): Unit

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

Source
JsonWriter.scala
def writeKey(x: LocalDate): Unit

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

Source
JsonWriter.scala
def writeKey(x: LocalDateTime): Unit

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

Source
JsonWriter.scala
def writeKey(x: LocalTime): Unit

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

Source
JsonWriter.scala
def writeKey(x: MonthDay): Unit

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

Source
JsonWriter.scala
def writeKey(x: OffsetDateTime): Unit

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

Source
JsonWriter.scala
def writeKey(x: OffsetTime): Unit

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

Source
JsonWriter.scala
def writeKey(x: Period): Unit

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

Source
JsonWriter.scala
def writeKey(x: Year): Unit

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

Source
JsonWriter.scala
def writeKey(x: YearMonth): Unit

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

Source
JsonWriter.scala
def writeKey(x: ZonedDateTime): Unit

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

Source
JsonWriter.scala
def writeKey(x: ZoneId): Unit

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

Source
JsonWriter.scala
def writeKey(x: ZoneOffset): Unit

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

Source
JsonWriter.scala
def writeNonEscapedAsciiKey(x: String): Unit

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 eligible for writing by this method.

Source
JsonWriter.scala
def writeNonEscapedAsciiVal(x: String): Unit

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 eligible for writing by this method.

Source
JsonWriter.scala
def writeNull(): Unit

Writes a JSON null value.

Writes a JSON null value.

Attributes

Source
JsonWriter.scala
def writeObjectEnd(): Unit

Writes a JSON array end marker (}).

Writes a JSON array end marker (}).

Attributes

Source
JsonWriter.scala
def writeObjectStart(): Unit

Writes a JSON array start marker ({).

Writes a JSON array start marker ({).

Attributes

Source
JsonWriter.scala
def writeRawVal(bs: Array[Byte]): Unit

Writes a byte array as a JSON raw value.

Writes a byte array as a JSON raw value.

Value parameters

bs

the byte array to write

Attributes

Source
JsonWriter.scala
def writeVal(x: BigDecimal): Unit

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

Source
JsonWriter.scala
def writeVal(x: BigInt): Unit

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

Source
JsonWriter.scala
def writeVal(x: UUID): Unit

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

Source
JsonWriter.scala
def writeVal(x: String): Unit

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
JsonCodecError

if the provided string has an illegal surrogate pair

Source
JsonWriter.scala
def writeVal(x: Duration): Unit

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

Source
JsonWriter.scala
def writeVal(x: Instant): Unit

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

Source
JsonWriter.scala
def writeVal(x: LocalDate): Unit

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

Source
JsonWriter.scala
def writeVal(x: LocalDateTime): Unit

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

Source
JsonWriter.scala
def writeVal(x: LocalTime): Unit

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

Source
JsonWriter.scala
def writeVal(x: MonthDay): Unit

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

Source
JsonWriter.scala
def writeVal(x: OffsetDateTime): Unit

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

Source
JsonWriter.scala
def writeVal(x: OffsetTime): Unit

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

Source
JsonWriter.scala
def writeVal(x: Period): Unit

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

Source
JsonWriter.scala
def writeVal(x: Year): Unit

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

Source
JsonWriter.scala
def writeVal(x: YearMonth): Unit

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

Source
JsonWriter.scala
def writeVal(x: ZonedDateTime): Unit

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

Source
JsonWriter.scala
def writeVal(x: ZoneId): Unit

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

Source
JsonWriter.scala
def writeVal(x: ZoneOffset): Unit

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

Source
JsonWriter.scala
def writeVal(x: Boolean): Unit

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

Source
JsonWriter.scala
def writeVal(x: Byte): Unit

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

Source
JsonWriter.scala
def writeVal(x: Short): Unit

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

Source
JsonWriter.scala
def writeVal(x: Char): Unit

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
JsonCodecError

in the case of Char value is a part of the surrogate pair

Source
JsonWriter.scala
def writeVal(x: Int): Unit

Writes an Int value as a JSON value.

Writes an Int value as a JSON value.

Value parameters

x

the Int value to write

Attributes

Source
JsonWriter.scala
def writeVal(x: Long): Unit

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

Source
JsonWriter.scala
def writeVal(x: Float): Unit

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
JsonCodecError

if the value is non-finite

Source
JsonWriter.scala
def writeVal(x: Double): Unit

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
JsonCodecError

if the value is non-finite

Source
JsonWriter.scala
def writeValAsString(x: BigDecimal): Unit

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

Source
JsonWriter.scala
def writeValAsString(x: BigInt): Unit

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

Source
JsonWriter.scala
def writeValAsString(x: Boolean): Unit

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

Source
JsonWriter.scala
def writeValAsString(x: Byte): Unit

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

Source
JsonWriter.scala
def writeValAsString(x: Short): Unit

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

Source
JsonWriter.scala
def writeValAsString(x: Int): Unit

Writes an Int value as a JSON string value.

Writes an Int value as a JSON string value.

Value parameters

x

the Int value to write

Attributes

Source
JsonWriter.scala
def writeValAsString(x: Long): Unit

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

Source
JsonWriter.scala
def writeValAsString(x: Float): Unit

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
JsonCodecError

if the value is non-finite

Source
JsonWriter.scala
def writeValAsString(x: Double): Unit

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
JsonCodecError

if the value is non-finite

Source
JsonWriter.scala