Sitemap

JSON for Full Stack Development

3 min readOct 8, 2024

--

JSON — JAVASCRIPT Object Notation

Press enter or click to view image in full size

JSON a lightweight, text-based data interchange format which is easy for humans to read and write and easy for interoperate. Web developers use it widely because it easily facilitate data between a server and a client among different systems.

It represents data as a collection of key-value pairs and ordered lists, making it structural and a simple format to read and understand. It is language compatible with most of the programming languages such as C, JavaScript, Python, Java and many more.

Where is JSON is mainly used?

It is widely used in web APIs, configuration files and data storage solutions because of its versatility it allows developers to handle data seamlessly across various applications. It enhances the efficiency of web services and applications.

JSON Syntax

  1. Object : Objects are represented in form of curly braces ‘{}’, objects contain key value pairs, where key and values can be string, Boolean, numbers, arrays , other objects and null.
Object in JSON

2. Arrays: Arrays are represented in ‘[]’, arrays are ordered list of values.

Press enter or click to view image in full size
Array in JSON

There are values such as string, number, Boolean, null and object used in the JSON.

String: Enclosed in double quotes.

· Number: Numeric values (integers or floating-point).

Get Jigyasa Bisht’s stories in your inbox

Join Medium for free to get updates from this writer.

· Boolean: true or false.

· Null: Represents an empty or non-existent value.

· Object: Nested JSON objects.

History

It was inspired by JavaScript. In 90s, developers needed a way to transmit data between server to client. At that time JavaScript being the primary language for browsers, provided a foundation for it.

In 2001, JSON came into picture when Douglas Crockford, a software engineer promoted it as lightweight data interchange format.

Now over the years wide range of developers use it with its increased use as it can work with jQuery, angular, Restful APIs.

Communicator between Front-end and Back-end Web Applications

Here are few points listing how JSON helps in Full stack:

1. Interchanging Data: As we know, JSON exchanges data between server and client. In a full-stack application, the front-end which is a client side can send requests to the back-end which is the sever side using JSON, and the server can respond with JSON data, creating a seamless data flow.

2. API Communication: Most of the applications use RESTful APIs and GraphQL for the communication of frontend and backend. JSON being the default format for API responses and requests enables front-end framework such as angular and React to consume data and interact with backend.

3. Decoupling: In a full stack project, front-end and back-end can be developed independently. JSON allows for decoupling which enables teams to work on different components without worrying about how data is formatted or transmitted.

4. Real-time data update: With many technologies like web socket, AEM full-stack application can achieve real-time data. In most of the cases, when JSON is bonded by client side, when the data is changed it immediately reflects in web applications making it suitable for applications like chat apps, dashboards.

5. Structured data: Data can be complex and hard to read and understand. JSON on the other hand provides clear and structural way to represent complex data.

6. Compatibility with modern framework: As it compatible across various programming languages, it supports modern frameworks too like Node js, Express. This compatibility streamlines development workflows and allows for rapid prototyping and deployment.

--

--

Jigyasa Bisht
Jigyasa Bisht

Written by Jigyasa Bisht

I am a software developer who loves reading and sports. You will find me coding, imagining, reading, playing. I prefer sometimes doing nothing.