Getting content from JSON string

I am currently developing an Android application which has a web backend. I can receive a JSON file which looks like the following:


I'm trying to figure out how to get the two coordinates from the JSON files and use them for mapping positions. Does anyone have any ideas how to get the two coordinates from the JSON file as doubles?


JSONObject jObject = new JSONObject(response);
double lat = jObject.getDouble("Latitude");
double lng = jObject.getDouble("lontitude");

What you need to do is create JSONObject and just get double values using getDouble(name);

Edit: Either create JSONArray(see comment below) or just do JSONObject jObject = new JSONObject(response.substring(1, response.lenth()-1));

Need Your Help

Why does GCC drop the frame pointer on 64-bit?

gcc assembly

What's the rationale behind dropping the frame pointer on 64-bit architectures by default? I'm well aware that it can be enabled but why does GCC disable it in the first place while having it enabl...

Git - Accidentally Overwrote Entire Commit History of Remote Repository

svn git git-svn

In an attempt to create a bridge between Git and SVN that allows developers on one project to use SVN and those on another project to use Git, I inadvertantly overwrote the entire git commit histor...