JSONs. Packets that Fill Most of Data Pipelines.

Photo by Pietro Jeng on Unsplash

Why you might care

There are more and more people who are curious what’s under the hood of tools and frameworks concerning data management. I like addressing those needs.

Just the basics

Formally, it’s JavaScript Object Notation. You shouldn’t pay too much attention to the full name. You don’t stop and ponder on the PDF file before using it, do you? What’s worth noting for a fraction of a second, though, is JavaScript part. It’s the ubiquitous framework when it comes to building interactive websites. Since JavaScript is extremely popular, there was no other destiny for JSON.

{“Geeks”:[
{ “firstName”:”Vivek”, “lastName”:”Kothari” },
{ “firstName”:”Suraj”, “lastName”:”Kumar” },
{ “firstName”:”John”, “lastName”:”Smith” },
{ “firstName”:”Peter”, “lastName”:”Gregory” }
]}
<Geeks>
<Geek><firstName>Vivek</firstName><lastName>Kothari</lastName</Geek>
<Geek><firstName>Suraj</firstName><lastName>Kumar</lastName></Geek>
<Geek><firstName>John</firstName><lastName>Smith</lastName</Geek>
<Geek><firstName>Peter</firstName><lastName>Gregory</lastName</Geek>
</Geeks>
  • JSON is built with two primary parts: keys and associated values.
  • Key is always a string enclosed in quotation marks.
  • Value has more freedom. A value can be a number, boolean expression, string, an array, or an object.
  • Key value pairs are combined with clear rule: key is followed by a colon which is followed by the value.
  • Key/value pairs are separated with a comma.
  • boolean — binary alternatives of true and false,
  • number — an integer,
  • string — text,
  • array — classic associative array of values,
  • object — an associative array of key/value pairs.
Photo by Luke Chesser on Unsplash

Back to the context

Data almost always needs to be moved from one place to another. The usual case is from a server to a client. Have you ever wondered what’s the package that gets into your weather app whenever you check it up? Now you know.

source: the author

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michał Poła

Michał Poła

Analytics engineer. Quantum information enthusiast.