DeserializerResult json时出现Odata GeometryLineString错误

时间:2019-09-06 06:16:18

标签: java odata deserialization olingo

我正在尝试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());

0 个答案:

没有答案