I want to parse the JSON response coming from HTTP REST call using the HTTPClient adapter in apama. The response string is as below,
{
"geometry": {
"type": "MultiPolygon",
"cordinates": [
[
[
[
-2.420261362208627,
51.29662513520916
],
[
-2.42211658046158,
51.28747916639892
],
[
-2.439047101373828,
51.28519049850415
],
[
-2.453288677334455,
51.273848703615954
]
]
]
]
},
"properties": {
"name": "Bath and NE Somerset",
"public_name": "Bath and North East Somerset",
"region": "South West",
"public_region": "South West"
}
}
I wrote an event definition for the same as below,
event E {
dictionary<string,dictionary<dictionary<string,string>,dictionary<string,sequence<sequence<sequence<sequence<float > > > > > > > geometry;
dictionary<string,string> properties;
}
But during runtime it was giving error : Expecting map but getting a list.
Please help.