What is JSON File

Acronym JSON denotes the JavaScript Object Notation and this JSON is most famous now because most of the APIs are written in JSON format rather than or instead of XML. A JSON FILE containing dot extension as .json and the inner data will be expressed in a key: value pair, the same as a JavaScript object.

JSON and object are not the same, nevertheless and the core contrast or difference is that the key in JSON must be in double-quotes, the values of the attributes are away from the number and null types must be in JSON quotes from the same as a JSON double-quotes. Most of the API data comes in JSON format, so most of the programmers know the JSON benefits and advantages of using it.

JSON DATA TYPES TO KNOW:-

JSON (JavaScript Object Notation) can be definite in an object or an array type. These objects and arrays are naturally acceptable data types in JSON. And JSON supportable other data types are boolean, null, and string. Not Supportable data types of JSON are undefined, function and data.

JSON will have the possibility to extend into other data types or formats and JSON accepts extra data types but crude JSON does not accept those extra data types eventually.

JSON FILES SYNTAX RULES:-

  • All the data in the file must be ringed by curly braces if you get the object type and ringed or surrounded by square brackets if you get an array type.
  • The appropriate object inside an array type must be swept or terminated by a comma notation.
  • Comma terminated value pairs also except the last item in the key list.
  • True or False choice section only for boolean values.
  • Double quotes will not be used in the Null data type.
  • Numbers will be treated as strings if we mentioned numbers with double quotes.
  • Keys in each JSON file must be exclusive and represented with double-quotes.
  • Single quotes are not allowed in the JSON files.

JSON API

JSON is placed in so many zones like in APIs and in much progress and you can’t do any programming work without JSON because APIs are now drafted in JSON instead of the XML format.

Initially, JSON was only supported by JavaScript but now it has been enhanced by so many programming languages like Python, Java, and Php. And also multi-languages have libraries for JSON to work with.

I hope this article about JSON files will help you out in the working progress of JSON. Thank you for spending your wonderful and valuable time with us to update your knowledge.Also check JSONpath Here.

Example JSON File Download

JSON File has dot .json extention. Download Simple JSON File Example Here.

JSON File Example

The {JSON} curly brace represents the JSON objects.

{"clients":[  
    {"name":"Azar", "email":"[email protected]"},  
    {"name":"Peter", "email":"[email protected]"},  
    {"name":"Vijay", "email":"[email protected]"}  
]}  

XML representation of above JSON File