I’m stuck with parsing JSON in Java using org.json. My JSON looks like this
[{"id" : "1",
"type" : "City",
"description" : [ "short_description" : "some data",
"long_description" : "some data",
"postal_code" : "49045",
"population" : "900000",
],
}
],
How I may parse for example an element of tag description, for example long_description ?
Use json-lib the you can simply add it as a library to your existing project and do like this:
data (JSON):
code to parse the data:
References: