Defining the records in nested format did the trick. Thanks.
Francois. -----Original Message----- From: Doug Cutting [mailto:[email protected]] Sent: Friday, December 09, 2011 3:10 PM To: [email protected] Subject: Re: Multiple records in a single schema in C++ On 12/09/2011 12:57 PM, Francois Forster wrote: > {"name": "opt", "type" : union ["null","cpy"]} That should probably instead be just: {"name": "opt", "type" : ["null","cpy"]} without the keyword 'union'. Could that be causing the error? You could also define the nested record inline, with: { "type": "record", "name": "cpx", "fields" : [ {"name": "re", "type": "double"}, {"name": "im", "type" : "double"}, {"name": "opt", "type" : ["null", {"type": "record", "name": "cpy", "fields" : [{"name": "re", "type": "double"}, {"name": "im", "type" : "double"}] } ] } ] } either should work. Doug
