kotlinxserializationcore
kotlinxserializationcore is the core component of the KotlinX Serialization library, which provides a framework for encoding and decoding Kotlin objects to and from various data formats such as JSON, Protobuf, CBOR, and others. It defines the primary interfaces, such as KSerializer and SerialFormat, and the basic infrastructure for serialization contexts, serializers, and serializers modules. The core module focuses on language‑agnostic reflection‑based serialization, enabling the generation of type‑safe serialization code at compile time through the @Serializable annotation.
The library uses Kotlin's Kotlin Metadata to discover class structure and leverages inline functions to achieve
kotlinxserializationcore is distributed under the Apache License 2.0, allowing free use in both open‑source and commercial
Developers typically instantiate a SerialFormat (for example, Json) and invoke encodeToString or decodeFromString methods provided by