I receive data from the server in JSON and parse using JsonUtils (GWT). They look like this:
[{"id":26,"name":"Circle1","description":"Test","type":"CIRCLE","coordinates":[{"latitude":50.364736755649716,"longitude":30.120391845703125}],"radius":6577.427847903551,"userId":1}]
I use this code to parse it:
JsArray<Geofence> geofenceJsArray = JsonUtils.safeEval(response.getText());
But I can't get access to the list of coordinates. When I call
geofenceJsArray.get(0).getCoordinates().size()
I receive this error message in browser's console:
Uncaught TypeError: $getCoordinates_1_g$(...).size_54_g$ is not a function
What I'm doing wrong? Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…