Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro, mail # user - Does avrocppgen support arrays?


Copy link to this message
-
Does avrocppgen support arrays?
John Langley 2013-08-13, 11:29
Does anyone have  an example of a json specification that avrogencpp will
accept that includes an array?

I tried to extend the cpx.json example included in the distribution to
include an array field in the record and it fails with this error:
    Failed to parse or compile schema: Unknown type: array

Below is my modification to the cpx.json example

{
    "type": "record",
    "name": "cpx",
    "fields" : [
        {"name": "re", "type": "double"},
        {"name": "im", "type" : "double"},
        {"name": "elements", "type" : "array", "items" : "string"}
    ]
}

Thanks in advance for pointers.