JSON Basic Course

Rumman Ansari   2020-03-18   Student   Miscellaneous > JSON   770 Share
JSON - Introduction
  • JavaScript Object Notation, commonly known as 'JSON', is heavily leveraged as a data-interchange format.

  • JSON is a subset of the JavaScript Programming language, Standard ECMA-262 3rd Edition-December 1999 where both,

    • Humans can read/write it easily.

    • Machines can parse and generate.

In this course, you will understand more about JSON.

JSON is a lightweight text format that is independent of any programming Languages thus making it an ideal option for data-interchange in today's Business world.

JSON Advantages
  • Uses a fewer number of standardized Syntax.

  • More Self-describing (readable by humans and machines).

  • JSON Properties and values can be accessed immediately by using JavaScript.

  • Code for parsing and interchanging JSON data is readily available in almost all modern programming languages.

  • Hierarchical (values can contain a list of objects or values).

  • Unlike Javascript, JSON can retrieve values from anywhere as it supports all languages.

  • JSON uses arrays and Objects.

JSON Usage
  • Transfers data between a server and various web applications.

  • Performs asynchronous data calls without requiring a page refresh. This is widely used for asynchronous browser/server communication

  • APIs and web services use JSON to transfer real-time sensitive data.

  • Compiles user data for local storage.

  • JSON is now being supported by almost all Programming languages.

  • JSON supports for sending, reading, and receiving texts available in all the real-world business.

  • JSON-RPC is a Remote Procedure call (RPC) protocol built on JSON, which allows system to send multiple notifications to the server.

JSON vs XML
  • JSON almost replaced XML which was previously leveraged as the only data interchange format.

JSON is preferred because of the following two important reasons:

  • JSON transfers data faster than XML because XML uses tags to describe data which increases their data size.

  • JSON uses typed Objects, which can be parsed by any standard JavaScript function. Whereas, XML uses type-less strings, which must be parsed by XML parser (XPath) during run-time, which makes it more complex.

JSON Limitations
  • JSON cannot handle large data. (Need to leverage other formats, which you will learn later in this course.)

  • Not suitable for handling different multimedia formats.

  • JSON does not have a feature to support 'comments'. This could be included as an additional attribute alone.