avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Goodman <...@hooklogic.com>
Subject RE: Avro serialization in C# - how to include schema
Date Thu, 30 May 2013 13:00:22 GMT
I guess I'll answer my own question.  It doesn't appear that the GenericWriter actually writes
the schema.  So I suppose my best option is to just write it myself before writing the record:
and then read it off before reading the record:
var writeSchema = Schema.Parse(decoder.ReadString());

I guess the schema is only normally included with the data for actual Avro data files (not
yet supported in C#).

- Tim

From: Tim Goodman
Sent: Tuesday, May 28, 2013 10:41 AM
To: 'user@avro.apache.org'
Subject: Avro serialization in C# - how to include schema

I'm trying to use Avro serialization in C#.  My understanding is that normally with Avro the
schema is written with the data.

But the constructor for GenericReader<T> requires both a writer schema and a reader
schema.  Is there a way to extract the writer schema from the data?  (In my case I wrote it
with GenericWriter<T> and the BinaryEncoder).

- Tim Goodman

View raw message