Skip to content

By three they come ... Enum, Fixed and Record

Choose a tag to compare

@Strech Strech released this 06 Jun 21:03
· 55 commits to master since this release

This release getting Avrora closer to the AVRO specification. Now it will be possible to encode and decode all 3 named types Enum, Fixed and already working one –Record.

It's simple as it was and requires no hassle. Here is a low-level example with some internal changes 😉

json = ~s({"namespace":"io.confluent","name":"CardType","type":"enum","symbols":["MASTERCARD","VISA","AMERICANEXPRESS"]})
{:ok, schema} = Avrora.Schema.Encoder.from_json(json)
{:ok, encoded} = Avrora.Codec.Plain.encode("VISA", schema: schema)

encoded # => <<2>>