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