I have my expansive server side java objects that implement these simplified interfaces:
interface Vector {
public double getX();
public double getY();
}
interface Geometry {
public List<Vector> getShell();//can get big
public List<List<Vector>> getHoles();
}
interface Feature {
public String getID();
public List<Geometry> getGeometry();
}
I construct a list of features that I convert to json using gson lib. The result looks like this, except that it's a lot bigger.
[{"i":"304","g":[{"s":[{"x":-3169996.4370428286,"y":1.1231962684336938E7},{"x":-3287403.71248886,"y":1.1192826925854929E7},{"x":-2935181.88615077,"y":1.115369116737292E7}....
I am able to parse the json into a JsArray where JsFeature is a javascriptobject that implements the feature interface.
How do I get the rest of the data without having to parse through my json vector by vector. Ideally, I would like to have a way to convert the List into JsList where JsGeometry is a JavascriptObject class implementing Geometry, which would include a List and so on and so forth..