Simple way to Create JSON file for Beginners

If you are new to JSON, initially it might be difficult for you to create a json file and follow the syntax. JSON is known as JavaScript Object Notation .

Standard definition ? JSON is an open-standard file format or data interchange format that uses human-readable text to transmit data objects consisting of attribute?value pairs and array data types (or any other serialisable value).

One of the tips is first create xml file and then convert it to JSON.

JSON is used mainly to retrieve information. Social media platform like Facebook stores information in JSON format. Storing the data in database sometimes is cumbersome job in recent times,MongoDB is one latest DB platform also stores data in JSON format . Also ,data is growing rapidly on internet with rise in population. JSON stores the data in file which is easy to read and find the information.

Let?s take example of Facebook data where user information is stored as JSON . It?s very easier to find the information of user i.e Name,Address,Hobbies, Behaviour etc .

Below is one sample format:

{ “User”: { “Name”: { “FirstName”: “John”, “LastName”: “Smith”, } }}

We can clearly see that ,we have maintained a hierarchy and also sub levels .

User has name and name has firstname and lastname field.

But, first time when you construct the json it will be complicated to construct it with proper syntax. So, its better to write a xml first .

Equivalent xml is:-



<firstname> John</firstname>




And then convert it to JSON using online websites available or using Programming API.


No Responses

Write a response