Skip to main content

Introduction to JSON

If your Job profile is Developer, QA or Data Scientist or any other related field, you might have heard the term "JSON (Jason or Jay-Sawn)", and if you’re a fresher, you might be little confused if you have not came across this term during your school or college. 

JSON stands for JavaScript Object Notation, which is basically a text-based data exchange format derived from JavaScript. We use JSON to store and transport data. JSON is widely used format available for use by many languages including Python, Ruby, PHP, and Java since the format is text only.

JSON is often used as a common format to serialize and deserialize data in applications that communicate with each other over the Internet.

Key points about JSON

  1. The JSON format was originally specified by Douglas Crockford, and is described in RFC 4627. 
  2. It is based on a subset of the JavaScript Programming Language Standard ECMA-262, 3rd Edition - December 1999.
  3. The official Internet media type for JSON is application/json.
  4. JSON uses the .json extension when it stands alone.
  5. RESTful web services use JSON extensively as the format for the data inside requests and responses. 
  6. JSON is self-describing and easy to understand
  7. JSON is a lightweight data-interchange format
  8. JSON is language independent 
  9. JSON is easy to read and write than XML.
  10. JSON supports array, object, string, number, boolean and null.

Example 

{
   "firstName": "Ram",
   "lastName": "Sharma",
   "age": 26,
   "phoneNumbers": [
      { "Mobile": "909-909-9090" },
      { "Home": "101-101-1010" }
   ]
}

JSON store data in Key-value pairs. You may call it simple, nested and JSON with arrays but JSON defines only two data structures: objects and arrays. An object is a set of name-value pairs, and an array is a list of values. We will discuss about JSON Syntax in upcoming tutorial.

Tags
Submitted by tgoswami on November 21, 2021

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.