io.api.bloxy.util.KlaxonConverters.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bloxy-api Show documentation
Show all versions of bloxy-api Show documentation
Kotlin & Java Library for all available Bloxy API endpoints
package io.api.bloxy.util
import com.beust.klaxon.Converter
import com.beust.klaxon.JsonValue
import io.api.bloxy.model.dto.dex.Args
/**
* Klaxon JSON parser extensions
*
* @author GoodforGod
* @since 22.11.2018
*/
class KlaxonConverters {
companion object {
val argsConverter = object : Converter {
override fun canConvert(cls: Class<*>) = cls == Args::class.java
override fun toJson(value: Any): String = ""
override fun fromJson(jv: JsonValue) = Args(jv.obj?.map ?: emptyMap())
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy