avro-kotlin / avro4k

Avro format support for Kotlin
Apache License 2.0
188 stars 36 forks source link

Support using avro serializers outside of avro4k #185

Open Chuckame opened 4 months ago

Chuckame commented 4 months ago

Issue

We currently have a LocalDate field with the LocalDateSerializer. Now if we use Json or any other decoder/encoder, it fails as the serializer is only accepting an avro encoder/decoder.

But the serializer itself is not using the avro methods, but only kotlinx methods like encodeInt or encodeLong.

Proposal

Only check the avro encoder/decoder if the serializer need it.