Json

object Json

A singleton for json serialization/deserialization, shared across the SDK as ObjectMapper instantiation is an expensive operation.

Example Usage:

val offering = Json.objectMapper.readValue<Offering>(payload)

val jsonString = Json.stringify(myObject)

val node = Json.parse(payload)

Properties

Link copied to clipboard
val jsonMapper: <Error class: unknown class>

The Jackson object mapper instance, shared across the lib.

Link copied to clipboard
val objectReader: <Error class: unknown class>

Functions

Link copied to clipboard
inline fun <T> parse(payload: String): T

Parse a json string into a kotlin object.

Link copied to clipboard
fun stringify(obj: Any): String

Converts a kotlin object to a json string.

Link copied to clipboard

Parse a JSON string into a Map.