Package-level declarations

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

Functions

Link copied to clipboard
inline fun <T> Json.decodeBufferedSourceToSequence(source: BufferedSource, format: DecodeSequenceMode = DecodeSequenceMode.AUTO_DETECT): Sequence<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.

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

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

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

Link copied to clipboard

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

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