JsonTools

Properties

Link copied to clipboard
val MOSHI: Moshi

Functions

Link copied to clipboard
inline fun <T : Any> fromJson(file: File): T
inline fun <T : Any> fromJson(path: Path): T
inline fun <T : Any> fromJson(source: BufferedSource): T
Link copied to clipboard
inline fun <T : Any> fromJsonValue(value: Any): T
Link copied to clipboard
fun Buffer.readJsonValueMap(): Map<String, Any>
Link copied to clipboard
inline fun <T : Any> toJson(value: T?, prettyPrint: Boolean = false): String
inline fun <T : Any> toJson(file: File, value: T?, prettyPrint: Boolean = false)
inline fun <T : Any> toJson(path: Path, value: T?, prettyPrint: Boolean = false)
inline fun <T : Any> toJson(sink: BufferedSink, value: T?, prettyPrint: Boolean = false)
Link copied to clipboard
inline fun <T : Any> toJsonBuffer(value: T?, prettyPrint: Boolean = false): Buffer