我正在尝试DeserializerResult GeometryLineString JSON,但显示错误
属性无效的值:GeometryLineString_1不能是对象或数组。
以下是我的JSON
{
"@odata.type": "#Odata_Geography_test.GeometryLineString_test",
"Id@odata.type": "Int32",
"Id": 99,
"GeometryLineString_1@odata.type": "GeometryLineString",
"GeometryLineString_1": {
"type": "LineString",
"coordinates": [
[
142.1,
164.1
],
[
223.14,
532.78
]
],
"crs": {
"type": "name",
"properties": {
"name": "EPSG:888"
}
}
}
}
Java代码
ODataDeserializer deserializer = this.odata.createDeserializer(requestFormat);
DeserializerResult result = deserializer.entity(requestInputStream, edmEntitySet.getEntityType());