TokenizingJson

object TokenizingJson

Json serialization that accepts Any?, and converts non-primitive values to string keys using InstanceTokenizer.

Types

TokenizingSerializer
Link copied to clipboard
object TokenizingSerializer : KSerializer<Any?>

KotlinX serializer that automatically converts non-primitive values to string tokens on serialization, and automatically replaces string tokens with the real Kotlin/JVM objects they represent on detokenization.

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getJsonElement
Link copied to clipboard
fun getJsonElement(value: Any?, requireTokenization: (Any?) -> Boolean? = null): JsonElement

Get a KotlinX JsonElement for any Kotlin/JVM value or instance.

getJsonReal
Link copied to clipboard
fun getJsonReal(value: JsonElement): Any?

Get a real value or instance from any KotlinX JsonElement.

hashCode
Link copied to clipboard
open fun hashCode(): Int
isNotPrimitive
Link copied to clipboard
fun isNotPrimitive(value: Any?): Boolean
toString
Link copied to clipboard
open fun toString(): String

Properties

json
Link copied to clipboard
val json: Json

KotlinX JSON entrypoint with default properties to make it easier to make and work with IPC packets.

Sources

jvm source
Link copied to clipboard