# Serialization formats This area of repository contains different libraries with various add-on formats which were not included in the core library. For convenience, they have same `groupId`, versioning and release cycle as core library. | Format | Artifact id | Platform | Status | Notes | |------------|------------------------------------|---------------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | JSON | `kotlinx-serialization-json` | all supported platforms | stable | | | JSON-Okio | `kotlinx-serialization-json-okio` | all supported by Okio platforms | experimental | Extensions on Json for integration with [Okio](https://square.github.io/okio/) library. | | HOCON | `kotlinx-serialization-hocon` | JVM only | experimental | Allows deserialization of `Config` object from popular [lightbend/config](https://github.com/lightbend/config) library into Kotlin objects.You can learn about "Human-Optimized Config Object Notation" or HOCON from library's [readme](https://github.com/lightbend/config#using-hocon-the-json-superset). | | ProtoBuf | `kotlinx-serialization-protobuf` | all supported platforms | experimental | | | CBOR | `kotlinx-serialization-cbor` | all supported platforms | experimental | | | Properties | `kotlinx-serialization-properties` | all supported platforms | experimental | Allows converting arbitrary hierarchy of Kotlin classes to a flat key-value structure à la Java Properties. | ## Other community-supported formats | Format | GitHub repo and Artifact | Platform | Notes | |--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Avro | [sksamuel/avro4k](https://github.com/sksamuel/avro4k)
`com.sksamuel.avro4k:avro4k` | JVM only | This library allows serialization and deserialization of objects to and from [Avro](https://avro.apache.org). It will read and write from Avro binary or json streams or generate Avro Generic Records directly. It will also generate Avro schemas from data classes. The library allows for easy extension and overrides for custom schema formats, compatiblity with schemas defined outside out of the JVM and for types not supported out of the box. | | Bson | [jershell/kbson](https://github.com/jershell/kbson)
`com.github.jershell:kbson` | JVM only | Allows serialization and deserialization of objects to and from [BSON](https://docs.mongodb.com/manual/reference/bson-types/). | | TOML | [Peanuuutz/tomlkt](https://github.com/Peanuuutz/tomlkt)
`net.peanuuutz.tomlkt:tomlkt` | all supported platforms | Multiplatform encoder and decoder for [TOML](http://toml.io/) 1.0.0 compliant. This library aims to provide similar API to the official JSON format (such as TomlLiteral, TomlTable), while adding TOML specific features (such as @TomlComment, @TomlMultilineString). | | TOML | [akuleshov7/ktoml](https://github.com/akuleshov7/ktoml)
`com.akuleshov7:ktoml-core` | all supported platforms | Fully Native and Multiplatform Kotlin serialization library for serialization/deserialization of TOML format. This library contains no Java code and no Java dependencies and it implements multiplatform parser, decoder and encoder of TOML. | | Minecraft NBT | [BenWoodworth/knbt](https://github.com/BenWoodworth/knbt)
`net.benwoodworth.knbt:knbt` | all supported platforms | Implements the [NBT format](https://minecraft.wiki/w/NBT_format) for kotlinx.serialization, and provides a type-safe DSL for constructing NBT tags. | | MsgPack | [esensar/kotlinx-serialization-msgpack](https://github.com/esensar/kotlinx-serialization-msgpack)
`com.ensarsarajcic.kotlinx:serialization-msgpack` | all supported platforms | Allows serialization and deserialization of objects to and from [MsgPack](https://msgpack.org/). | | SharedPreferences | [EdwarDDay/serialization.kprefs](https://github.com/EdwarDDay/serialization.kprefs)
`net.edwardday.serialization:kprefs` | Android only | This library allows serialization and deserialization of objects into and from Android [SharedPreferences](https://developer.android.com/reference/android/content/SharedPreferences). | | XML | [pdvrieze/xmlutil](https://github.com/pdvrieze/xmlutil)
`io.github.pdvrieze.xmlutil:serialization` | all supported platforms | This library allows for reading and writing of XML documents with the serialization library. It is multiplatform, providing both a shared parser/writer for xml as well as platform-specific parsers where available. The library is designed to handle existing xml formats that use features that would not be available in other formats such as JSON. | | YAML | [charleskorn/kaml](https://github.com/charleskorn/kaml)
`com.charleskorn.kaml:kaml` | JVM only | Allows serialization and deserialization of objects to and from [YAML](http://yaml.org). | | YAML | [him188/yamlkt](https://github.com/him188/yamlkt)
`net.mamoe.yamlkt:yamlkt` | all supported platforms | Allows serialization and deserialization of objects to and from [YAML](http://yaml.org). Basic serial operations have been implemented, but some features such as compound keys and polymorphism are still work in progress. | | CBOR | [L-Briand/obor](https://github.com/L-Briand/obor)
`net.orandja.obor:obor` | JVM, Android | Allow serialization and deserialization of objects to and from [CBOR](https://cbor.io/). This codec can be used to read and write from Java InputStream and OutputStream. | | Amazon Ion (binary only) | [dimitark/kotlinx-serialization-ion](https://github.com/dimitark/kotlinx-serialization-ion)
`com.github.dimitark:kotlinx-serialization-ion` | JVM only | Allow serialization and deserialization of objects to and from [Amazon Ion](https://amzn.github.io/ion-docs/). It stores the data in a flat binary format. Upon destialization, it retains the references between the objects. | | android.os.Bundle | [AhmedMourad0/bundlizer](https://github.com/AhmedMourad0/bundlizer)
`dev.ahmedmourad.bundlizer:bundlizer-core` | Android | Allow serialization and deserialization of objects to and from [android.os.Bundle](https://developer.android.com/reference/android/os/Bundle). | | CSV | [hfhbd/kotlinx-serialization-csv](https://github.com/hfhbd/kotlinx-serialization-csv)
`app.softwork:kotlinx-serialization-csv` | all supported platforms | Allows serialization and deserialization of CSV files. There are still some limitations (ordered properties). | | Fixed Length Format | [hfhbd/kotlinx-serialization-csv](https://github.com/hfhbd/kotlinx-serialization-csv)
`app.softwork:kotlinx-serialization-flf` | all supported platforms | Allows serialization and deserialization of [Fixed Length Format files](https://www.ibm.com/docs/en/psfa/7.2.1?topic=format-fixed-length-files). Each property must be annotated with `@FixedLength` and there are still some limitations due to missing delimiters. | | JSON5 | [xn32/json5k](https://github.com/xn32/json5k)
`io.github.xn32:json5k` | JVM, Native | Library for the serialization to and deserialization from [JSON5](https://json5.org) text. | | DynamoDB | [DynaMap](https://github.com/codanbaru/dynamap)
`com.codanbaru.kotlin:dynamap` | JVM | Allows serialization and deserialization of objects to and from [AttributeValue](https://sdk.amazonaws.com/kotlin/api/latest/dynamodb/aws.sdk.kotlin.services.dynamodb.model/-attribute-value/index.html) of Amazon [DynamoDB](https://aws.amazon.com/dynamodb/) |