I have a JSON object, a part of which is as follows:
{
"bounding_box": {
"coordinates": [
[
[
-74.026675,
40.683935
],
[
-74.026675,
40.877483
]
]
],
"type": "Polygon"
}
}
Here, the coordinates are sent as an array of Object. Now, for this JSON object, I want to create the avro schema (.avsc file), which is, as of now, as follows:
{
"name": "bounding_box",
"type": {
"namespace": "my.tweet.stream",
"type": "record",
"name": "BoundingBox",
"fields": [{
"name": "coordinates",
"type": {
"type": "array",
"items": "object"
}
},
{
"name": "type",
"type": ["string", "null"]
}
]
}
}
However, with the current schema, I am getting the following error:
Execution generate-id of goal org.apache.avro:avro-maven-plugin:1.8.1:schema failed: Undefined name: "object"
Could someone help, how can I specify java.lang.Object type in avro schema?
Thanks.