Difference between JSONObject and JSONArray

JSONObject:

  1. Curly bracket ( { ) represents a JSONObject
  2. It contains name values like ID: 1
  3. Order of elements is not important
  4. JSONObject is a single item

JSONArray:




  1. Square bracket ( [ ) represents a JSONArray 
  2. It contains only series values like [1,'Value'] 
  3. Order of values is  important
  4. JSONArray is a collection of JSONObject

Comments

Popular posts from this blog

How to solve an 8 puzzle problem using A* Algorithm in python

Timus Online Judge 1000. A+B Problem question and SOLVE with sudo code

URI Online Judge | 1013 The Greatest Solve with source code