Note: Default warning
JSON is a data structure that replaces XML. Compared to XML, it's more compact but equally descriptive. JSON is a string where elements are marked with specific symbols:
{}
Curly braces represent objects;[]
Square brackets represent arrays;""
Double quotes contain properties or values;:
Colon indicates that the latter is the value of the former (this value can be a string, number, or another array or object)So {"name": "Tom"}
can be understood as an object containing name as Tom, while
[{"name: "Tom"}, {"name": "Jerry"}]
represents an array containing two objects.
Q: Why doesn't {name:'json'}
pass validation?
A: The JSON official specification states that if it's a string, both keys and values should be enclosed in double quotes, so the correct format is
{"name":"json"}
.
Advanced Tool Usage
Use URL parameters to pass JSON data, combined with some software for quick parsing of content:
fullscreen
parameter: Including this in the URL will automatically enter focus mode, enjoying a clean and simple online parsing view. Link: json.cn/?fullscreen.
data
parameter: Pass JSON data directly to the tool through this parameter, example: json.cn/#data={"name":"John","age":30}
url
parameter: The tool will attempt to fetch JSON data from the specified URL using your current network, example: json.cn/#url=https://static.json.cn/r/json/demo.json
Note:
data and url parameters come after the # symbol, not the ? symbol, and their contents will be automatically cleared after reading.
This way, your parsed data remains local and won't be sent to our servers, also avoiding capture by search engines and tracking codes.
The downside is that when you refresh the page, the parameter contents will be lost. If you want to view the complete URL, you can find it in your browser's history.