Member-only story
Working with JSON — Syntax Rules and Data Types
JSON stands for JavaScript Object Notation.
It’s a popular data-interchange format that has many uses.
In this article, we’ll take a look at how to use JSON.
Syntax Validation
We can validate the syntax for JSON with many tools.
Many IDEs like WebStorm and text editors like Visual Studio Code have JSON validation capabilities built-in.
There are also many websites that let us validate our JSON code.
They include:
They all provide syntax highlighting and will show errors if there are any errors with the syntax.
JSON as a Document
JSON can be used as documents. We just have to save it with the .json
extension to use them.
The JSON MediaType
JSON has its own MIME type, which is application/json
.
It’s a standard Internet media type that we can use for communication.