Grady-lad
Grady-lad

Reputation: 105

how to parse a huge json file

Hey guys im currently working on an app that will receive a vast amount of co-ordinates via a JSON file, the json file will look like the following:

{"posts":[{"Latitude":"53.4041999","lontitude":"-6.377542","Latitude":"53.4041999","lontitude":"-6.377542","Latitude":"53.4041999","lontitude":"-6.377542"}]}

Does anyone have any suggestions of how I could get the co-ordinates as double values ?

Upvotes: 0

Views: 211

Answers (3)

Dan S
Dan S

Reputation: 9189

Easier than gson and Double.parseDouble() use getDouble() or optDouble().

Upvotes: 2

ChristopheCVB
ChristopheCVB

Reputation: 7315

double myDouble = Double.parseDouble(theString);

Upvotes: 1

pna
pna

Reputation: 5761

Please, take a look at Gson that is a great library to work on json serialization and deserialization even into objects easily and fast

Upvotes: 0

Related Questions