Android IllegalStateException:应为双精度值,但在行1列385路径$ .features [2] .geometry.coordinates [0]处为BEGIN_ARRAY

我有这个json,我想用线串类型恢复第二个坐标。

{
"type": "FeatureCollection","features": [
    {
        "type": "Feature","geometry": {
            "type": "Point","coordinates": [
                2.1163,48.8288
            ]
        },"properties": {
            "address": "-","datetime": "2019-11-12 12:47:38"
        }
    },{
        "type": "Feature","coordinates": [
                2.1085,48.8379
            ]
        },"datetime": "2019-11-12 12:53:11"
        }
    },"geometry": {
            "type": "Linestring","coordinates": [
                [
                    2.1163,48.8288
                ],[
                    2.1165,48.8289
                ],[
                    2.1175,[
                    2.1136,48.8309
                ],[
                    2.1117,48.837
                ],[
                    2.1052,48.8366
                ],[
                    2.1068,48.8376
                ],[
                    2.1085,48.8379
                ]
            ]
        }
    }
]
}

我的模特:

公共类几何{

public static final String SERIALIZED_TYPE = "type";


@SerializedName(SERIALIZED_TYPE)
public String type;


public static final String SERIALIZED_COORDINATE = "coordinates";

@SerializedName(SERIALIZED_COORDINATE)
public double[] coordinatesPoint;

@Override
public String toString() {
    return "Geometry{" +
            "type='" + type + '\'' +
            ",coordinatesPoint=" + Arrays.toString(coordinatesPoint) +
            '}';
}

}

我知道他想要一个双重数组,但我不知道如何解决它,谢谢您对我的帮助或启发。

yeluogui1236 回答:Android IllegalStateException:应为双精度值,但在行1列385路径$ .features [2] .geometry.coordinates [0]处为BEGIN_ARRAY

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3101315.html

大家都在问