Sat Jan 30 2021

JSON with advantage and disadvantage

DatabaseFeatured0 views
JSON with advantage and disadvantage

JavaScript Object Notation (JSON) is a lightweight text-based open standard data-interchange format. It is human readable. JSON is derived from a subset of JavaScript programming language. It is entirely language independent and can be used with most of the modern programming languages.

JSON is almost a subset of the object literal notation of JavaScript. Because it can be used to represent JavaScript object literals, JSON commonly serves as a data-interchange language. In this it has much in common with XML. Because it is JavaScript notation, JSON can often be used in JavaScript programs without any need for parsing or serializing. It is a text-based way of representing JavaScript object literals, arrays, and scalar data.

Although it was defined in the context of JavaScript, JSON is in fact a language-independent data format. A variety of programming languages can parse and generate JSON data. JSON is relatively easy for humans to read and write, and easy for software to parse and generate. It is often used for serializing structured data and exchanging it over a network, typically between a server and web applications.

A JavaScript object is an associative array, or dictionary, of zero or more pairs of property names and associated JSON values. A JSON object is a JavaScript object literal. It is written as such a property list enclosed in braces ({, }), with name-value pairs separated by commas (,), and with the name and value of each pair separated by a colon (:). In JSON each property name and each string value must be enclosed in double quotation marks (").

In JavaScript notation, a property name used in an object literal can be, but need not be, enclosed in double quotation marks. It can also be enclosed in single quotation marks ('). As a result of this difference, in practice, data that is represented using unquoted or single-quoted property names is sometimes referred to loosely as being represented in JSON, and some implementations of JSON, including the Oracle Database implementation, support the lax syntax that allows the use of unquoted and single-quoted property names.

A string in JSON is composed of Unicode characters, with backslash (\) escaping. A JSON number (numeral) is represented in decimal notation, possibly signed and possibly including a decimal exponent. An object property is often called a field. An object property name-value pair is often called an object member. Order is not significant among object members.

Advantage of JSON -

1. JSON is Faster - JSON syntax is very easy to use. We have to use only as an syntax which provide us a easy parsing of the data and faster execution of the data. Since its syntax is very small and light weighted that's the reason that it executes the response in faster way.

2. Server Parsing - On the server side parsing is the important part that developers want if the parsing will be fast on the server side then only user can get the fast response of their response so in this case JSON server side parsing is strong point that indicates us to use the JSON on server side.

3. Schema Support - It has wide range of supported browser compatibility with the operating systems so the applications made with the coding of JSON doesn't require much effort to make it all browser compatible. During development developer thinks for the different different browsers but JSON provides that functionality.

4. Tool for sharing data - JSON is the best tool for the sharing data of any size even audio, video etc. This is because JSON stores the data in the arrays so data transfer makes easier. For this reason, JSON is a superior file format for web APIs and for web development.

Disadvantages of JSON -

First and foremost, in JSON has no error handling for JSON calls. Another major drawback of JSON is that it can be quite dangerous if used with untrusted services or untrusted browsers, because a JSON service returns a JSON response wrapped in a function call, which will be executed by the browser if it will be used with untrusted browser it can be hacked, this makes the hosting Web Application Vulnerable to a variety of attacks. If you are going to use JSON services, it's very important to be aware of the threats which JSON have in that and also be aware with the things which can protect it. JSON only have limited supported tools which we can use during JSON development.

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.