JsonMapper

interface JsonMapper<T : Any>

Interface to implement custom mapping logic between Json and class of type T. Should be implemented on class companion object.

Functions

Link copied to clipboard
abstract fun fromJson(json: Json): T

Maps Json representation to value of type T

Link copied to clipboard
abstract fun toJson(value: T): Json

Maps value of type T to Json representation.