Default

object Default : Json

The default instance of Json with default configuration.

Functions

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.

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.

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

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.

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

Deserializes the given JSON string into a corresponding JsonElement representation.

Properties

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