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

URI Online Judge | 1013 The Greatest Solve with source code

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

URI Online Judge | 1020 Age in Days Solve with source code