JSON Summary
Words: 275
Pages: 1
96
96
DownloadJSON Summary
Name
Institution Affiliation
JSON Summary
JavaScript Object Notation (JSON), refers to a simplified methodology for storing data in an organized and easy to access methodology. Using JSON offers a viable methodology upon which human-readable content can be accessed in logical ways. The ease of usability of JSON has made it a favorite for website designers and coders as opposed to using conventional XML versions. The syntax used in JSON is different from that used by XML because it can be read and used as data irrespective of the format in use by a programming language.
Common ways in which JSON is used in website builds include:
Reading of data from a webserver hen display it on a web page. The function v=can be demonstrated using a string as the input instead of using a file. The code below indicates how JSON creates a string using JSON syntax
var text = ‘{ “employees” : [‘ +'{ “firstName”:”John” , “lastName”:”Doe” },’ +'{ “firstName”:”Anna” , “lastName”:”Smith” },’ +'{ “firstName”:”Peter” , “lastName”:”Jones” } ]}’;
The syntax used in javascript is a subset of that used in JSON. Thus, the JSON.parse text may be used to convert a JSON text into a JavaScript object as shown in the code below
var obj = JSON.parse(text);
When the browser is too old and does not have any JavaScript support function, the JSON.parse () can use the eval () function, which is used to convert JSON text into JavaScript objects as shown below
var obj = eval (“(” + text + “)”);
The advantage of using the eval () function is that it has the capacity to execute or compile any JavaScript.
Wait! JSON Summary paper is just an example!
However, the downside is that it would create security loopholes on the website created.
Thus, it would be ideal to use JSON for converting JSON texts into JavaScript objects because of the ease of its readability. JSON parsers are also fast and would thus yield enhanced results as opposed to using conventional ones. Nonetheless, JSON can only be used on particular browsers including Firefox 3.5, Internet Explorer 8, Chrome, Opera 10 and Safari 4.
Subscribe and get the full version of the document name
Use our writing tools and essay examples to get your paper started AND finished.