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

Reply via email to