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

info.metadude.kotlin.library.engelsystem.adapters.ZonedDateTimeJsonAdapter.kt Maven / Gradle / Ivy

There is a newer version: 9.2.0
Show newest version
package info.metadude.kotlin.library.engelsystem.adapters

import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.JsonReader
import com.squareup.moshi.JsonWriter
import org.threeten.bp.ZonedDateTime

class ZonedDateTimeJsonAdapter : JsonAdapter() {

    private val delegate = ZonedDateTimeAdapter()

    override fun fromJson(reader: JsonReader): ZonedDateTime? {
        val jsonValue = reader.nextString()
        return delegate.fromJson(jsonValue)
    }

    override fun toJson(writer: JsonWriter, value: ZonedDateTime?) {
        throw NotImplementedError()
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy