JsonStreamWriter

Interface for serialization. Specific formats should implement this interface according to their own requirements. Currently only aws.smithy.kotlin.runtime.serde.json.JsonSerializer implements this interface.

Properties

Link copied to clipboard
abstract val bytes: ByteArray?

Json content will be constructed in this UTF-8 encoded byte array.

Functions

Link copied to clipboard
abstract fun beginArray()

Begins encoding a new array. Each call to this method must be paired with a call to {@link #endArray}.

Link copied to clipboard
abstract fun beginObject()

Begins encoding a new object. Each call to this method must be paired with a call to {@link #endObject}.

Link copied to clipboard
abstract fun endArray()

Ends encoding the current array.

Link copied to clipboard
abstract fun endObject()

Ends encoding the current object.

Link copied to clipboard
abstract fun writeName(name: String)

Encodes the property name.

Link copied to clipboard
abstract fun writeNull()

Encodes {@code null}.

Link copied to clipboard
abstract fun writeRawValue(value: String)

Appends the contents of value without any additional formatting or escaping. Use with caution

Link copied to clipboard
abstract fun writeValue(value: <Error class: unknown class>)
abstract fun writeValue(value: <Error class: unknown class>)
abstract fun writeValue(bool: Boolean)
abstract fun writeValue(value: Byte)
abstract fun writeValue(value: Double)
abstract fun writeValue(value: Float)
abstract fun writeValue(value: Int)
abstract fun writeValue(value: Long)
abstract fun writeValue(value: Number)
abstract fun writeValue(value: Short)
abstract fun writeValue(value: String)

Encodes {@code value}.