How to work with JSON in Android
In this post I'll describe a way to work with JSON in Android. . First of all, what is JSON. JSON is short for JavaScript Object Notation and it is an independent data exchange format. Data structures in JSON are based on key / value pairs and we can summarize in these points: JSON Object : { string : value , .... } JSON Array : [ value , value .....] value : string || number || object || array || true || false, || null If you observe normally JSON data will have square brackets and curly brackets. The difference between [ and { is, the square bracket represents starting of an JSONArray node whereas curly bracket represents JSONObject. This is an example: { "id":10, "name":"myname", "listMessages": [ { "value":1, "text":"value", "id_message":0 }, { "value":11,"text":"value","id_message":1} ] }