model.CityNameBSONCodec.kt Maven / Gradle / Ivy
package com.github.fluidsonic.baku
import org.bson.BsonReader
import org.bson.BsonWriter
internal object CityNameBSONCodec : AbstractBSONCodec() {
override fun BsonReader.decode(context: BSONCodingContext) =
CityName(readString())
override fun BsonWriter.encode(value: CityName, context: BSONCodingContext) {
writeString(value.raw)
}
}