Difference between JSONObject and JSONArray
JSONObject:
JSONArray:
- Curly bracket ( { ) represents a JSONObject
- It contains name values like ID: 1
- Order of elements is not important
- JSONObject is a single item
JSONArray:
- Square bracket ( [ ) represents a JSONArray
- It contains only series values like [1,'Value']
- Order of values is important
- JSONArray is a collection of JSONObject
Comments
Post a Comment