Default

object Default : Json

The default instance of Json with default configuration.

Functions

decodeFromJsonElement
Link copied to clipboard
fun <T> decodeFromJsonElement(deserializer: DeserializationStrategy<T>, element: JsonElement): T

Deserializes the given element into a value of type T using the given deserializer.

decodeFromString
Link copied to clipboard
override fun <T> decodeFromString(deserializer: DeserializationStrategy<T>, string: String): T

Deserializes the given JSON string into a value of type T using the given deserializer.

encodeToJsonElement
Link copied to clipboard
fun <T> encodeToJsonElement(serializer: SerializationStrategy<T>, value: T): JsonElement

Serializes the given value into an equivalent JsonElement using the given serializer

encodeToString
Link copied to clipboard
override fun <T> encodeToString(serializer: SerializationStrategy<T>, value: T): String

Serializes the value into an equivalent JSON using the given serializer.

parseToJsonElement
Link copied to clipboard
fun parseToJsonElement(string: String): JsonElement

Deserializes the given JSON string into a corresponding JsonElement representation.

Properties

configuration
Link copied to clipboard
val configuration: JsonConfiguration
serializersModule
Link copied to clipboard
open override val serializersModule: SerializersModule