Json

218 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
218
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Json

  1. 1. Prepared for Dr. Azrul Hazri bin Jantan Present by Zainal Abdul Kahar JSON Discovering JavaScript Object Notation Review! Computing Conversations! By Charles Severance! University of Michigan
  2. 2. Background ❖ Discovered by Douglas Crockford self- appointed evangelist! ❖ Invent and applying JSON in 2001 at State Software! ❖ Create a webpage to make it as standard! ❖ Popular format for data serialisation! ❖ Extensively use to encode data for transfer between server and Ajax application, to connect two servers communicating via web services
  3. 3. Introduction ❖ JSON (JavaScript Object Notation) is a lightweight data- interchange format. It is easy for humans to read and write and easy for machines to parse and generate! ❖ It is based on a subset of the JavaScript Programming Language! ❖ JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C+ +, C#, Java, JavaScript, Perl, Python, and many others
  4. 4. Data exchange ❖ The most common structures use in programming are scalar variables, linear lists and key-value pair! ❖ JSON represents these structures in a form of direct serialisation! ❖ Greatly reduce the mismatch between in memory structure in application and the serialisation format! ❖ JSON is convenient and efficient! ❖ Using JSON in JavaScript gives advantage compared of using other format such as XML
  5. 5. JSON vs XML ❖ It is a constant debate between JSON and XML for the right formatting for data representation! ❖ XML is an enterprise solution with many toolset for manipulation! ❖ JSON slowly displacing XML as the preferred way for data exchange! ❖ JSON has the natural advantage as a serialisation format which exactly the same as data structures that programming language represent
  6. 6. JSON vs XML ❖ The number of new API using JSON is increasing and displacing XML
  7. 7. XML vs JSON
  8. 8. JSON Structure ❖ JSON is built on two structures:! ❖ A collection of name/value pairs. In various languages, this is realised as an object, record, struct, dictionary, hash table, keyed list, or associative array.! ❖ An ordered list of values. In most languages, this is realised as an array, vector, list, or sequence.
  9. 9. JSON Structure Source JSON.ORG
  10. 10. JSON Structure
  11. 11. TEST CODE
  12. 12. Raw Data Data extracted from VB.net Server
  13. 13. Security ❖ Although JSON is intended solely as a data serialisation format, its design as a non-strict subset of the JavaScript scripting language poses several security concerns. These concerns centre on the use of a JavaScript interpreter to execute JSON text dynamically as embedded JavaScript. This exposes a program to errant or malicious scripts. This is a serious issue when dealing with data retrieved from the Internet.
  14. 14. Future of JSON ❖ According to Charles, once the programmer switch to JSON, they seldom get back to XML! ❖ The more programmers use JSON, the requirement for schema for JSON’s object grows! ❖ There are effort to add value to JSON without changing it such as “JSON for linked data”.

×