All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.serialization_json.1.4.3.source-code.JacksonMapper.kt Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
package com.hexagonkt.serialization

import kotlin.reflect.KClass

object JacksonMapper : Mapper {

    override fun toFieldsMap(instance: Any): Map<*, *> =
        JacksonHelper.mapper.convertValue(instance, Map::class.java)

    override fun  toObject(map: Map<*, *>, type: KClass): T =
        JacksonHelper.mapper.convertValue(map, type.java)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy