How to work with JSON in Android
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaLpQxfAYUz_CI7Kkh2HMWb7sKHTM3DyriNeAdcp9HEFPk5YCylDue7efidEzFsG_eF3AocYDx4oIlqwhXLUN9ubh6h4vL-kfnDC-uvrJPQIK9FEZE3hVh3gLnffnRDZ_JHEBQARcc6gXm/s640/device0.gif)
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} ] }