Json5
Main interface to serialize a given object hierarchy to JSON5 or vice versa.
The default class implementing this interface is available as the companion object. It can be used as shown in the following example:
import io.github.xn32.json5k.Json5
import kotlinx.serialization.encodeToString
Json5.encodeToString(1000)
A custom instance is obtained by calling the builder function and populating the associated ConfigBuilder object with the desired configuration options.
Inheritors
Types
Functions
Convenience function that calls Json5.decodeFromStream with the default serializer for the type.
Deserializes the JSON5 input from inputStream using the given deserializer and returns an equivalent object hierarchy.
Deserializes the JSON5 input in string using the given deserializer and returns an equivalent object hierarchy.
Convenience function that calls Json5.encodeToStream with the default serializer for the type.
Serializes the given value using the given serializer and writes the result to outputStream.
Serializes the given value using the provided serializer and returns the value as a string.