Difference
between Json Array and Json Object
-
S.No
Json Array Json Object 1 A JSONArray is an ordered sequence of values. A JSONObject is an unordered collection of name/value pairs. 2Its external text form is a string wrapped in square brackets with commas separating the values.Its external form is a string wrapped in curly braces with colons between the names and values, and commas between the values and names.
Example for Json Array
[ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"},
{"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"},
{"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"}
]
Example for Json Object
{"bindings": [
{"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"},
{"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"},
{"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"}
]
};
"Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.php jobs in hyderabad.
ReplyDelete"
Nice post it is very helpful.
ReplyDeleteDifference Between JSON and XML .
thanks