0

我有以下合同

"shape": {
        "type": "MultiPoly",
        "points": [
            [
                [
                    [
                        -92.53941242522892,
                        41.51492979593705
                    ],
                    [
                        -92.53942433363545,
                        41.51493000420402
                    ],
.
.
.

"shape": {
      "type": "Poly",
      "points": [
          [
              [
                  -92.6814794540405,
                  41.7796968811509
              ],
              [
                  -92.6820158958435,
                  41.7801769167539
              ]
.
.
.

如您所见,MultiPoly在数组层次结构中有另一个级别。如何创建 POJO 以成功解析这两种情况?可能吗?

List<List<List<Double>>> points;似乎有效,但仅适用于Polys。

谢谢,奥特曼

4

1 回答 1

0

所以我能够通过将 存储points在通用Object []数组中然后根据类型手动解析来解决这个问题。

private Object[] points;

于 2017-12-01T18:38:35.227 回答