Skip to content

Understanding JSON

What is JSON?

Imagine JSON as a special language that computers use to talk to each other. It's like a secret code that helps them share information in a way that's easy to understand.

Types of Information JSON Can Hold

JSON can store different types of information, like:

  • Words (called "strings")
  • Numbers
  • True or False (called "booleans")
  • Nothing (called "null")

How JSON is Used

JSON is like a universal language that many programming languages can understand. This means that different programs can easily share information with each other, even if they're written in different languages.

Example of JSON

Here's an example of JSON that describes characters from the anime "Bocchi the Rock!":

json
[
	{
		"Character Name": "Gotoh, Hitori",
		"Age": 15,
		"Hair Color": "Pink"
	},
	{
		"Character Name": "Ikuyo, Kita",
		"Age": 15,
		"Hair Color": "Red"
	},
	{
		"Character Name": "Ijichi, Nijika",
		"Age": 16,
		"Hair Color": "Yellow"
	},
	{
		"Character Name": "Yamada, Ryo",
		"Age": 16,
		"Hair Color": "Blue"
	}
]

In this example, each character is represented as an object with properties like "Character Name," "Age," and "Hair Color." The square brackets [] indicate that this is a list of objects.

Released under the MIT License.