Learn What is JSON And Why Should You Use JSON

0
1568
Use JSON

Use JSON

In this chapter, we are going to assist novices in understanding the basic functionality of the JSON data format. JSON is the abbreviation for ‘JavaScript Object Notation’ which is designed to exchange data as a standard format. It is a simple text-based and lightweight data standard, which is intended for the human readable data exchange. Douglas Crockford is the person who specified the JSON format for the very first time. When JSON is used on the internet, then it is declared with the media type as ‘application/json’. JSON data filename has an extension as .json. JSON data format can be used with multiple programming languages such as JavaScript, C, C++, PHP, Python, PERL, Ruby, Java/J2EE, etc.

In this tutorial, it is expected that the JSON’s novices possess an elementary knowledge on how the web applications work over the HTTP protocol along with the knowledge of JavaScript.

Key Points to remember for JSON
• JSON is the abbreviation for ‘JavaScript Object Notation’
• The JSON format was stated by Douglas Crockford.
• JSON data filename has an extension as .json.
• The Internet Media type for JSON is application/json.
• It is a human-readable data interchange.
• It is an extension to the JavaScript scripting language.
• The public.json is the Uniform Type Identifier.

Applications of JSON data format
• JSON data format is widely used in the programming for browser extensions and websites which are written in the JavaScript language.
• JSON data format is another data format (after XML) which can be used to transmit the structured data between a client and server in the web applications.
• JSON data format is frequently used in the serialization and transmission of the structured data over the network.
• JSON data format is used in the programming of Web services and APIs in order to provide public data.
• It is a language independent data format which widens the scope of its use with the other programming languages.

Characteristics of JSON data format
• The JSON data format is very simple to read and write.
• It is a simple text-based and lightweight data interchange format.
• JSON data format is language independent and can be used with multiple programming languages such as JavaScript, C, C++, PHP, Python, PERL, Ruby, Java/J2EE, etc.

A Simple Example on JSON data format
The following is a very simple example to demonstrate the JSON data format, which can be used to store information related to students and the courses they are taking in a university.

Shown above is a simple JSON format. Lets use this format in the static HTML (json-demo.html) to demonstrate how simple it is to use.

Output: –
When we will execute the above HTML code in any browser, then we can observe that the JSON data is processed and displayed on the web page as shown below.

JSON data

Source code for Application of JSON data formart is here: – Learn What is JSON

Conclusion: –
In this chapter, we discussed the characteristics and applications of JSON data format along with its overview and a suitable example.

LEAVE A REPLY

Please enter your comment!
Please enter your name here