Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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?
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.
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB