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: BigDecimal)
abstract fun field(descriptor: SdkFieldDescriptor, value: BigInteger)
abstract fun field(descriptor: SdkFieldDescriptor, value: Document?)
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: Instant, format: TimestampFormat)

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
abstract fun serializeBigDecimal(value: BigDecimal)

Serializes the given value.

Link copied to clipboard
abstract fun serializeBigInteger(value: BigInteger)

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: Document?)

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: Instant, format: TimestampFormat)

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.