nawfal cuteberg
nawfal cuteberg

Reputation: 1805

how can i parse a json that contains Geo-coordinates?

i have this object in a Json file and i succeded at parsing many objects but i couldn't parse this one :

"advertiser_marker_geocoord": "33.848463,-7.033653"

how can i parse it using java?

Upvotes: 0

Views: 480

Answers (1)

Arpit Garg
Arpit Garg

Reputation: 8546

// Here json is assumed to be a json object accompanied from response you would be getting.

String value = json.getString("advertiser_marker_geocoord");

now split values on behalf of , String arr[] = value.split(",");

If you want me share exact code.. please share the exact json that you are getting

Upvotes: 1

Related Questions