core library

Protocol for encoding and decoding objects to various data formats.

This library contains only the core protocol interfaces and classes.

  • For reference implementations of common data formats see the implementation library.
  • For extensions, helpers and utilities that make working with the protocol more convenient see the extended library.
  • For a high-level API that combines the protocol with end-user abstractions see the mapper library.

Classes

Codable<T>
An object that can both encode and decode a value of type T to/from various data formats.
Decodable<T>
An object that can decode a value of type T from various data formats.
Decoder
A data format that can decode different types of data.
DecodingType<T>
A type of data that can be decoded by a Decoder.
Encodable<T>
An object that can encode a value of type T to various data formats.
Encoder
A data format that can encode different types of data.
IteratedDecoder
A decoder that can decode iterated collections of data.
IteratedEncoder
An encoder that supports encoding iterated collections.
KeyedDecoder
A decoder that can decode iterated collections of key-value pairs of data.
KeyedEncoder
An encoder that supports encoding key-value pairs.
MappedDecoder
A decoder that can decode direct-access collections of key-value pairs of data.
SelfCodable<T extends SelfEncodable>
A default Codable implementation for SelfEncodable types.
SelfEncodable
An object that can encode itself to various data formats.