as can see array mapped below string contains json object attributes might have values again arrays of json objects.
simple way parse array of json objects (for elements in hierarchy)?
[{"address_components": [{"long_name":"china","short_name":"cn","types" ["country","political"]}], "formatted_address":"volksrepublik china", "geometry":{ "bounds":{ "$":{"b":18.1535216,"d":53.56097399999999}, "fa":{"b":73.49941360000003,"d":134.77280989999997} }, "location": {"jb":35.86166,"kb":104.19539699999996}, "location_type":"approximate", "viewport":{ "$":{"b":18.1535216,"d":53.56097399999999}, "fa":{"b":73.49941360000003,"d":134.77280989999997} } }, "types":["country","political"] }]
this json stirng. check more here:
json (javascript object notation) lightweight data-interchange format. easy humans read , write. easy machines parse , generate. based on subset of javascript programming language, standard ecma-262 3rd edition - december 1999. json text format language independent uses conventions familiar programmers of c-family of languages, including c, c++, c#, java, javascript, perl, python, , many others. these properties make json ideal data-interchange language.
the json data interchange format supported in java. these 3 popular third party java libraries process json data, jackson, google gson , json.simple.
this link may you.
it contains java json tutorial these libraries.
Comments
Post a Comment