That's good to hear, Doug.  I'd definitely prefer to be able to use actual Avro 
data files in my C# app.

Tim

-----Original Message-----
From: Doug Cutting [mailto:[email protected]] 
Sent: Thursday, May 30, 2013 12:36 PM
To: [email protected]
Subject: Re: Avro serialization in C# - how to include schema

The encoder/decoder API is lower-level, used to implement both RPC and data 
files, not used directly by most applications.

Data files should be supported in C# in Avro 1.7.5, due out soon.

https://issues.apache.org/jira/browse/AVRO-823

Doug

On Thu, May 30, 2013 at 6:00 AM, Tim Goodman <[email protected]> wrote:
> 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:
>
> encoder.WriteString(schema.ToString());
>
> 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: '[email protected]'
> 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
>
>

Reply via email to