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

io.api.bloxy.util.KlaxonConverters.kt Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
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