You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Why learn JSON
38
38
---------------------
39
39
JSON stands for JavaScript Object Notation is text-based and human-readable. JSON has become a widely accepted and popular format for data due to its platform-neutral nature, lightweight format, and it’s the ability to convert directly to native JavaScript Objects. JSON is being used everywhere from Web APIs to NoSQL databases, to server-side language libraries and client-side frameworks.
40
40
41
-
JSON has significantly improved server-to-browser communications, especially when it comes to AJAX. JSON is better than XML and more popular! Easily exchange data between client and server applications. JSON is easy to use and built for storing and exchanging data.
41
+
JSON has significantly improved server-to-browser communications, especially when it comes to AJAX. JSON is better than XML (eXtensible Markup Language) and more popular! Easily exchange data between client and server applications. JSON is easy to use and built for storing and exchanging data.
- JSON is a syntax for storing and exchanging data
93
-
- JSON is a lightweight data-interchange format
99
+
- JSON is a lightweight data-interchange, Data representation format
94
100
- JSON is `self-describing`, an easier to understand, easy to use and alternative format to `XML (eXtensible Markup Language)` also widely used these days
95
101
- JSON is language independent (JSON uses JavaScript syntax, with text-only format,
96
102
Text can be read and used as a data format by any programming language)
103
+
- JSON is commonly used for APIs and Configurations
97
104
98
105
```
99
106
- The JSON format was specified and popularized by `Douglas Crockford`
@@ -112,6 +119,8 @@ JSON uses, follows and based on Object Literal Notation syntax of JavaScript. JS
112
119
1.2. Why use JSON?
113
120
---------------------
114
121
122
+
Other than JSON, XML (eXtensible Markup Language) use to be the only option/alternative for open data interchange.
123
+
115
124
- JSON is text-based and human-readable, easily exchange data between client and server applications
116
125
- it's a lightweight data-interchange format that is quickly becoming the default format for data exchange on the internet today!
117
126
- JSON is better than XML and more popular!
@@ -153,7 +162,7 @@ JSON is programming language independent Data Interchange Format - an only text-
153
162
- JSON is language independent
154
163
- JSON uses, follows and based on Object Literal Notation syntax of JavaScript
155
164
- JSON is widely used to exchange, send and receive data from server to client and vice versa
156
-
- JSON represent data in the pair of Curley braces and in the form of key-value pairs ie property and data e.g. ` var Employee = { "employeeName": "Dinanath", "employeeId": "101", "empId": 101} `
165
+
- JSON represent data in the pair of Curley braces and in the form of key-value pairs ie. property and data/value ie. attribute and data/value e.g. ` var Employee = { "employeeName": "Dinanath", "employeeId": "101", "empId": 101} `
157
166
- Transfer data easily between Server and Client
158
167
159
168
1.6. JSON Syntax
@@ -251,13 +260,16 @@ The JSON format is almost exactly alike to JavaScript objects.
| JavaScript Object Notation | eXtensible Markup Language |
255
265
| JSON uses `key : value` or `name : value` pair to store data (JSON doesn't use end tag) | XML uses `tags **< value >**, element or node` to store data |
256
-
| JSON is shorter | XML is pretty larger/lengthy as we need to open and close tags for every `name` or `key`|
266
+
| JSON is shorter, JSON has a more compact style than XML| XML is pretty larger/lengthy as we need to open and close tags for every `name` or `key`|
257
267
| JSON is `quicker and easier` to read and write | XML is `little difficult to read and write` as we need to write many tags |
258
268
| JSON can use arrays | XML cant use arrays, it uses tags |
259
269
| JSON can be `parsed by a standard JavaScript function`| XML has to be `parsed with an XML parser`|
260
270
| For AJAX applications, JSON is faster and easier than XML | XML is much more difficult to parse than JSON |
271
+
| JSON uses less data overall, so reduces the cost and increases the parsing speed | The XML parsing process can take a long time due to verbose nature of xml and its element structure |
272
+
| JSON uses a `map data structure`| XML uses a `tree data structure`|
261
273
262
274
### 1.7.2. Similarity between JSON and XML
263
275
@@ -281,6 +293,8 @@ Both JSON and XML can be used to exchange, send and receive data from a web serv
<imgsrc="_images-json-javascript-object-notation/1.8.2-json-xml-trends-compare.png"alt="JSON vs XML Google Trends"title="JSON vs XML Google Trends"width="1000"border="2" />
0 commit comments