StructSerializer

Functions

Link copied to clipboard
abstract fun endStruct()

Ends the struct that was started (i.e. in JSON this would be a '}').

Link copied to clipboard
abstract fun field(descriptor: SdkFieldDescriptor, value: <Error class: unknown class>)
abstract fun field(descriptor: SdkFieldDescriptor, value: <Error class: unknown class>)
abstract fun field(descriptor: SdkFieldDescriptor, value: <Error class: unknown class>?)
abstract fun field(descriptor: SdkFieldDescriptor, value: SdkSerializable)
abstract fun field(descriptor: SdkFieldDescriptor, value: Boolean)
abstract fun field(descriptor: SdkFieldDescriptor, value: Byte)
abstract fun field(descriptor: SdkFieldDescriptor, value: ByteArray)
abstract fun field(descriptor: SdkFieldDescriptor, value: Char)
abstract fun field(descriptor: SdkFieldDescriptor, value: Double)
abstract fun field(descriptor: SdkFieldDescriptor, value: Float)
abstract fun field(descriptor: SdkFieldDescriptor, value: Int)
abstract fun field(descriptor: SdkFieldDescriptor, value: Long)
abstract fun field(descriptor: SdkFieldDescriptor, value: Short)
abstract fun field(descriptor: SdkFieldDescriptor, value: String)
abstract fun field(descriptor: SdkFieldDescriptor, value: <Error class: unknown class>, format: <Error class: unknown class>)

Writes the field name given in the descriptor, and then serializes value.

Link copied to clipboard
abstract fun listField(descriptor: SdkFieldDescriptor, block: ListSerializer.() -> Unit)

Writes the field name given in the descriptor, and then serializes the list field using the given block.

Link copied to clipboard
abstract fun mapField(descriptor: SdkFieldDescriptor, block: MapSerializer.() -> Unit)

Writes the field name given in the descriptor, and then serializes the map field using the given block.

Link copied to clipboard
abstract fun nullField(descriptor: SdkFieldDescriptor)

Writes the field name given in the descriptor, and then serializes null.

Link copied to clipboard
abstract fun structField(descriptor: SdkFieldDescriptor, block: StructSerializer.() -> Unit)

Writes the field name given in the descriptor, and then serializes the struct field using the given block.

Inherited functions

Link copied to clipboard
fun <T> StructSerializer.field(descriptor: SdkFieldDescriptor, input: T, serializeFn: SerializeFn<T>)
Link copied to clipboard
abstract fun serializeBigDecimal(value: <Error class: unknown class>)

Serializes the given value.

Link copied to clipboard
abstract fun serializeBigInteger(value: <Error class: unknown class>)

Serializes the given value.

Link copied to clipboard
abstract fun serializeBoolean(value: Boolean)

Serializes the given value.

Link copied to clipboard
abstract fun serializeByte(value: Byte)

Serializes the given value.

Link copied to clipboard
abstract fun serializeByteArray(value: ByteArray)

Serializes the given value.

Link copied to clipboard
abstract fun serializeChar(value: Char)

Serializes the given value.

Link copied to clipboard
abstract fun serializeDocument(value: <Error class: unknown class>?)

Serializes the given value.

Link copied to clipboard
abstract fun serializeDouble(value: Double)

Serializes the given value.

Link copied to clipboard
abstract fun serializeFloat(value: Float)

Serializes the given value.

Link copied to clipboard
abstract fun serializeInstant(value: <Error class: unknown class>, format: <Error class: unknown class>)

Serializes the given value.

Link copied to clipboard
abstract fun serializeInt(value: Int)

Serializes the given value.

Link copied to clipboard
abstract fun serializeLong(value: Long)

Serializes the given value.

Link copied to clipboard
abstract fun serializeNull()

Serializes the given value.

Link copied to clipboard

Calls the serialize method on the given object.

Link copied to clipboard
abstract fun serializeShort(value: Short)

Serializes the given value.

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

Serializes the given value.