Currently MOXy does not support multi-dimensional JSON arrays. You can use the following enhancement request to track this feature:
Umarshalling nested arrays with MOXy
문제
I'm using JAXB and MOXy to unmarshal structure like
"coordinates": [
[
[
-5.9105761,
54.6850694
],
[
-5.6877263,
54.6850694
]
]
]
Usually, when I'm facing json arrays, I just use code like
Integer[] coordinate;
@XmlElement(name = "coordinate")
public Integer[] getCoordinate(){
return coordinate;
}
public void setCoordinate...
and it works. So, for that structure I wanted to use similar code
Float[][][] coordinates;
@XmlElement(name = "coordinates")
public Float[][][] getCoordinates(){...
But during unmarshalling MOXy throws NPE. Can't you tell me, what's wrong with that approach?
Regards, Mikhail.
해결책
제휴하지 않습니다 StackOverflow