kotlinx.serialization
kotlinx.serialization copied to clipboard
Support YAML (YML) officially
YAML is heavily used as a config format and far more relevant than some of the other formats that have first class support. I believe YAML should be supported officially instead of relying on 3rd party libraries mentioned in the docs.
Non-JSON formats in the kotlinx.serialization have 'experimental' status, so not sure if this can be qualified as first-class support. Besides, what's wrong with 3rd party providers?
Non-JSON formats in the kotlinx.serialization have 'experimental' status, so not sure if this can be qualified as first-class support. Besides, what's wrong with 3rd party providers?
True, they are experimental, but they are still prioritized over YAML. It would be great to have official YAML support from Kotlin team since there is smaller chance of it being abandoned, typically better code quality due to stricter standards, quicker to fix vulnerabilities, etc compared to 3rd party libraries.
No one offers kotlin multiplatform yaml serialization , only jvm is supported mostly and others who do support kotlin multiplatform aren't feature complete
There are some third-party multiplatform libraries available that enable the YAML format. kaml and yamlkt are two examples.
I strongly agree with @iocapps . Another thing to point out is that third-party libraries do not always offer the same level of consistency. As an example, I discovered that the yamlkt library exhibits distinct behavior and results compared to the JSON serializer provided by kotlinx.serialization, particularly in scenarios involving polymorphic serialization. I would love to witness the YAML format's support within kotlinx.serialization, even if in an experimental stage.