我想使用 apama 中的 HTTPClient 适配器解析来自 HTTP REST 调用的 JSON 响应。响应字符串如下,
{
"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"
}
}
我写了一个与下面相同的事件定义,
event E {
dictionary<string,dictionary<dictionary<string,string>,dictionary<string,sequence<sequence<sequence<sequence<float > > > > > > > geometry;
dictionary<string,string> properties;
}
但是在运行时它给出了错误:Expecting map but getting a list。
请帮忙。