Basic concepts of encoding and decoding of serialized data.
A skeleton implementation of both Decoder and CompositeDecoder that can be used for simple formats and for testability purpose. Most of the
decode* methods have default implementation that delegates
decodeValue(value: Any) as TargetType. See Decoder documentation for information about each particular
A skeleton implementation of both Encoder and CompositeEncoder that can be used for simple formats and for testability purpose. Most of the
encode* methods have default implementation that delegates
encodeValue(value: Any). See Encoder documentation for information about each particular
This interface indicates that decoder supports consuming large strings by chunks via consumeChunk method. Currently, only streaming json decoder implements this interface. Please note that this interface is only applicable to streaming decoders. That means that it is not possible to use some JsonTreeDecoder features like polymorphism with this interface.
Decoder is a core deserialization primitive that encapsulates the knowledge of the underlying format and an underlying storage, exposing only structural methods to the deserializer, making it completely format-agnostic. Deserialization process takes a decoder and asks him for a sequence of primitive elements, defined by a deserializer serial form, while decoder knows how to retrieve these primitive elements from an actual format representations.
Encoder is a core serialization primitive that encapsulates the knowledge of the underlying format and its storage, exposing only structural methods to the serializer, making it completely format-agnostic. Serialization process transforms a single value into the sequence of its primitive elements, also called its serial form, while encoding transforms these primitive elements into an actual format representation: JSON string, ProtoBuf ByteArray, in-memory map representation etc.
Begins a collection, encodes it using the given block and ends it.
Begins a collection, calls block with each item and ends the collections.