JSON Tutorial
JSON: JavaScript Object Notation (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 Examples
{
"sites": [
{ "name":"Example" , "url":"www.example.com" },
{ "name":"google" , "url":"www.google.com" },
{ "name":"Weibo" , "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 language and platform. JSON parsers and JSON libraries support many different programming languages. Currently, a great many dynamic (PHP, JSP, .NET) programming languages support JSON.
- JSON is self-descriptive and easier to understand.
JSON - Convert to JavaScript Objects
The JSON text format is syntactically identical to the code for creating JavaScript objects.
Due to this similarity, without needing a parser, JavaScript programs can use the built-in eval() function to generate native JavaScript objects 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/