model.UrlJSONCodec.kt Maven / Gradle / Ivy
package com.github.fluidsonic.baku
import com.github.fluidsonic.fluid.json.*
import io.ktor.http.Url
internal object UrlJSONCodec : AbstractJSONCodec() {
override fun JSONDecoder.decode(valueType: JSONCodingType) =
Url(readString())
override fun JSONEncoder.encode(value: Url) {
writeString(value.toString())
}
}