Data analytics generalist. I publish notes, lessons, and tools for data analytics and investing.
A.) Jason Voorhees (Friday the 13th)
B.) Jason Statham
C.) Jason Derulo
D.) The file type for machines.
Let’s break it down.
Let’s take a look.
One example of code is a line that reads the following:
Merriam-Webster defines notation as a system of characters, symbols, or abbreviated expressions used in an art or science or in mathematics or logic to express technical facts or quantities. One common notation is using x to represent an unknown value, or variable, in mathematics.
However, in this instance, humans designed JSON as a specific notation that can be easily interpreted by a machine. An apt comparison for notation that is easily human-readable would be a grocery list. The graphic below shows the transition of a typical grocery list from normal human notation into a JSON format.
In this graphic, the objects are the name of the list, the categories of grocery items, and the various items themselves. Each object is surrounded by curly brackets, while the items inside them are written as “key” : “value” pairs. You can try writing in a JSON format here.
Because JSON files are difficult for humans to interpret, programmers need to eventually convert the output into something more readable. If you don’t have any programming knowledge and need to interpret a JSON file, there are JSON viewers on the web. We can test one out with the grocery list in JSON format from the image above.
Imagine trying to read a Harry Potter novel written in JSON format. Reading an entire chapter would probably take hours and it would give you a headache. This is comparable to the struggle that machines have with reading and interpreting our novels written in paragraph form, except I don’t think computers can have headaches. Regardless, a machine can read a JSON formatted file MUCH FASTER than data or text written in a human-readable format. Programmers refer to speed as performance. Programmers love it when their code has high performance (i.e. executes quickly).
Next time you hear someone mention JSON, it will no longer seem like a foreign language to you. No need to bite your pencil out of frustration. Think back to your grocery list. All JSON does is transform information into a different format. The new format allows machines to read the information quicker.
I’m sure you will perform well, too.
Image Sources Unsplash
Previously published https://thedatageneralist.com/tech101-who-is-json/