https://www.tutorialrepublic.com/javascript-tutorial/javascript-json-parsing.php
What is JSON?
JSON stands for JavaScript Object Notation. JSON is extremely lightweight data-interchange format for data exchange between server and client which is quick and easy to parse and generate.
Object:
Array:
首先理解JSONArray和JsonObject
1.JSONObject和JSONArray的数据表示形式
JSONObject的数据是用 { } 来表示的
列如: { "id" : "123", "courseID" : "huangt-test", "title" : "提交作业", "content" : null }
而JSONArray,顾名思义是由JSONObject构成的数组,用 [ { } , { } , … , { } ] 来表示的
例如: [ { "id" : "123", "courseID" : "huangt-test", "title" : "提交作业" } , { "content" : null, "beginTime" : 1398873600000 "endTime" } ] ;
表示了包含2个JSONObject的JSONArray
数组类型和对象类型,一个是[], {}