Last updated on

What is JSON


I was getting bored so here is an article about JSON.

What the heck JSON?

JSON or Jason you can pronounce it anyway as its creater Crockford said in 2011.

”There’s a lot of argument about how you pronounce that, but I strictly don’t care.”

Its a basic file & data transfer formate. It is widely used in case of transfter of data also there are database that are based on JSON like MongoDB, Firebase etc. So knowing basic json is must for every programmer & developer.

Types Supported by JSON

JSON only support string, boolean, number, Array, Object. From these type you can reperesent all the data you what to reperesent in the world.

For example if you want to reperesent date&time you can use string - 2024-04-01T10:00:00+00.00Z.If you want to reperesent location coordinate you can use number & Object.

There you go you now leanred JSON

Let’s dissucss some of the complex data so you can grasp it full.

Examples

Imagin you have user who have some data like below

Name - John Dev
Email - [email protected]
Gender - Male
haveChildern - No
Salary - 25000

Below is the Same reperesentaion in JSON

{
  "name":"John Dev",
  "email":"[email protected]",
  "gender":"male" // we could use boolean but there are more gender so we have to use string
  "haveChildren":false,
  "salary":5000000.01

}