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

ssm.sdk.json.JSONConverterObjectMapper.kt Maven / Gradle / Ivy

The newest version!
package ssm.sdk.json

import com.fasterxml.jackson.core.type.TypeReference

class JSONConverterObjectMapper : JSONConverter {


	override fun  toCompletableObjects(clazz: Class, value: String): List {
		val type: TypeReference> = object : TypeReference>() {}
		return JsonUtils.toObject(value, type)
	}

	override fun  toCompletableObject(clazz: Class, value: String): T? {
		return toObject(clazz, value)
	}

	override fun  toObject(clazz: Class, value: String): T?  {
		return if (value.isBlank()) {
			null
		} else {
			JsonUtils.toObject(value, clazz)
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy