You are on page 1of 2

JSON VS JAVASCRIPT

According to the authors, JavaScript is a "lightweight object-oriented language with


interpretable first-class functions." However, it is also utilized in a variety of non-browser
situations, including node.js and Apache Couch DB. JavaScript is a prototype-based scripting
language that supports object-oriented, imperative, and functional programming styles, as well
as other programming paradigms such as Python and Ruby.

In comparison, JSON is considered to as a "lightweight data-transmission format." The


JavaScript Object Notation (JSON) data interchange standard was developed by the JavaScript
programming language and library. Humans can easily do reading and writing tasks. Due to the
readability of this code, it is easy for machines to understand and produce. JavaScript, as a
subset of the Java programming language, is a web application development language.

JavaScript Object Notation is abbreviated as JSON. It is essentially a text format that enables the
transmission of data between devices, such as client and server computers. Due to the fact that
its Origin is based on the way a JavaScript object works, it is functionally similar to but not
identical to a JavaScript object. Despite its ancestry in JavaScript, it is extensively used in a
number of programming languages, including C, Ruby, Python, and PHP, to name a few.
Additionally, web development makes significant use of it. Given the file's small size and ease of
transformation into a data structure, it may be considered a potential alternative to other
formats like as XML and HTML.

Douglas Crockford developed the JSON format in the early 2000s and standardized it the
following year. Because JSON is a text-based format, it is simple to transmit and receive data,
and it can be utilized as a data format by any computer language. Despite its formal difference,
JSON is a subset of javascript and is effectively supported in some way by all contemporary
programming languages.

JSON's structure is composed of two main components, which are discussed in detail below.

• An index is a collection of key/value pairs stored in a database.

• An ordered list of items.


The JSON format has a syntax that is quite similar to the JavaScript code that is used to
construct objects in the computer programming language.

Additionally, as a consequence of this common feature, a JavaScript application may rapidly


convert JSON data into native JavaScript objects. However, despite the fact that the JSON
syntax was derived from the JavaScript object notation language, the JSON format is nothing
more than plain text. It is possible to generate and read JSON data with Python, or any other
computer language for that matter.

Similarly to how JavaScript object properties are expressed, JSON data is represented using
name/value pairs in the same way that JSON data is represented using name/value pairs. It is
necessary to create name/value pairs by utilizing field names (which should be surrounded in
double quotes), a colon, and then the value. In order for JSON names to be valid, they must be
enclosed in double quotes. However, the names of JavaScript classes vary from this convention.

You might also like