Package-level declarations

Extensions for kotlinx.serialization.json.Json for integration with the popular Okio library.

Functions

Link copied to clipboard
inline fun <T> <Error class: unknown class>.decodeBufferedSourceToSequence(source: BufferedSource, format: <Error class: unknown class> = DecodeSequenceMode.AUTO_DETECT): <Error class: unknown class><T>

Transforms the given source into lazily deserialized sequence of elements of type T using UTF-8 encoding and deserializer retrieved from the reified type parameter. Unlike decodeFromBufferedSource, source is allowed to have more than one element, separated as format declares.

fun <T> <Error class: unknown class>.decodeBufferedSourceToSequence(source: BufferedSource, deserializer: <Error class: unknown class><T>, format: <Error class: unknown class> = DecodeSequenceMode.AUTO_DETECT): <Error class: unknown class><T>

Transforms the given source into lazily deserialized sequence of elements of type T using UTF-8 encoding and deserializer. Unlike decodeFromBufferedSource, source is allowed to have more than one element, separated as format declares.

Link copied to clipboard
inline fun <T> <Error class: unknown class>.decodeFromBufferedSource(source: BufferedSource): T

Deserializes the contents of given source to the value of type T using UTF-8 encoding and deserializer retrieved from the reified type parameter.

fun <T> <Error class: unknown class>.decodeFromBufferedSource(deserializer: <Error class: unknown class><T>, source: BufferedSource): T

Deserializes JSON from source using UTF-8 encoding to a value of type T using deserializer.

Link copied to clipboard
inline fun <T> <Error class: unknown class>.encodeToBufferedSink(value: T, sink: BufferedSink)

Serializes given value to a sink using UTF-8 encoding and serializer retrieved from the reified type parameter.

fun <T> <Error class: unknown class>.encodeToBufferedSink(serializer: <Error class: unknown class><T>, value: T, sink: BufferedSink)

Serializes the value with serializer into a sink using JSON format and UTF-8 encoding.