Forgive me if this is silly question:
I need to add a header to the headerless file I successfully created using the nuget package.
I have a C# class (Event) that models the data.
ex:
namespace Cars.Models
{
public class CarsEvent
{
public Cars Cars{ get; set; }
}
public class Cars
{
public object Door{ get; set; }
public string Wheels{ get; set; } = "";
public object Hood{ get; set; }
}
}
I created the schema
schema = AvroConvert.GenerateSchema(Event.GetType());
I create the avro file
byte[] avroSerializedTo;
avroSerializedTo = AvroConvert.SerializeHeadless(Event, schema);
How do I add a header?
Forgive me if this is silly question: I need to add a header to the headerless file I successfully created using the nuget package. I have a C# class (Event) that models the data. ex: namespace Cars.Models { public class CarsEvent { public Cars Cars{ get; set; } } public class Cars { public object Door{ get; set; } public string Wheels{ get; set; } = ""; public object Hood{ get; set; } } } I created the schema schema = AvroConvert.GenerateSchema(Event.GetType()); I create the avro file byte[] avroSerializedTo; avroSerializedTo = AvroConvert.SerializeHeadless(Event, schema); How do I add a header?