Reputation: 749
We have a system where we just need the Avro raw bytes, without the single object encoding header, and also not the Avro container format. Just the bytes please. We pass the identifier of the schema to the deserializer via another path.
I can't find the correct call in the Avro Rust sources or documentation
Any hints?
Upvotes: 2
Views: 1072
Reputation: 749
It turns out to be pretty trivial with avro_rs
to_avro_datum(schema, avro_record)
As said above, one needs to identify the writer schema, which in the above link was done via an http header. Internally we use both Confluent and single object encoding to keep the data together with the schema.
Upvotes: 4
Reputation: 24
Because in this code it's not possible. Writer
constructor automatically serialises schema into the buffer. The only way I can think of is to write our own W
that would automatically ditch everything we don't need.
Upvotes: -1