JSON Tutorial
JSON: JavaScript Object NNotation (JavaScript Object Notation)
JSON is a syntax for storing and exchanging text information, similar to XML.
JSON is smaller, faster, and easier to parse than XML.
JSON is easy for humans to read and write.
Programming languages such as C, Python, C++, Java, PHP, and Go all support JSON.
JSON example
{
"
sites
"
:
[
{
"
name
"
:
"
Runoob Tutorial
"
,
"
url
"
:
"
www.runoob.com
"
}
,
{
"
name
"
:
"
"
,
"
url
"
:
"
www.google.com
"
}
,
{
"
name
"
:
"
"
,
"
url
"
:
"
www.weibo.com
"
}
]
}
This sites object is an array containing 3 site records (objects).
What is JSON?
- JSON stands for JavaScript Object Notation (JavaScript Object Notation)
- JSON is a lightweight text data interchange format
- JSON is language-independent: JSON uses JavaScript syntax to describe data objects, but JSON is still independent of languages and platforms. JSON parsers and JSON libraries support many different programming languages. Currently, many dynamic (PHP, JSP, .NET) programming languages support JSON.
- JSON is self-describing and easier to understand
JSON - converted to a JavaScript object
The JSON text format is syntactically identical to the code for creating JavaScript objects.
Because of this similarity, without a parser, a JavaScript program can use the built-in eval() function to generate a native JavaScript object from JSON data.
JSON tools
- JSON formatting tool:https://www.jyshare.com/front-end/53/
- JSON escape/unescape:https://www.jyshare.com/front-end/7683/
- JSON online parsing tool:https://www.jyshare.com/front-end/7438/
- JSON diff comparison tool:https://www.jyshare.com/front-end/9557/