Companion

object Companion

Functions

Link copied to clipboard
fun <T : Any> fromJson(json: String, ref: TypeReference<T>): T

Converts a JSON string to an object of the specified TypeReference.

fun <T : Any> fromJson(json: String, clazz: Class<T>): T

Converts a JSON string to an object of the specified class.

Link copied to clipboard
fun getMapperInstance(): ObjectMapper

Returns the ObjectMapper instance used for object mapping.

fun getMapperInstance(isYamlReader: Boolean = false): ObjectMapper

Returns an instance of ObjectMapper with the specified reader format.

Link copied to clipboard
fun toJson(value: Any): String

Converts an object to a JSON string.