avro-kotlin / avro4k

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

Update de/serialization examples in README #137

Closed jangalinski closed 1 year ago

jangalinski commented 1 year ago

I am trying to use avro4k, but I am struggling with the usage.

it seems that the examples in the README do not reflect the current state of the lib anymore.

It says I could use

val os = AvroOutputStream.binary(schema, Pizza.serializer()).to(File("pizzas.avro"))

and

val input = AvroInputStream.binary(Pizza.serializer(), schema).from(File("pizzas.avro"))

but there is no static function binary in either of those streams.

Could you please update the docs?

thake commented 1 year ago

@jangalinski, thanks for raising this issue! Indeed, the code examples were outdated. I've updated them.