0
13kviews
Explain in detail JSON mashups with neat diagram.

Mumbai University > Information Technology > Sem6 > Advanced Internet Technology

Marks: 10M

Year: May 2015,Dec 2015

1 Answer
5
383views

enter image description here

The readability and simplicity features of JSON have made it one of the most popular notations in the mashup community. JSON, being a notation, provides a way in which objects are written so that human beings can read it easily. It has built-in JavaScript feature that made JSON a viable mashup technology. The architecture of mashups in JSON implementation is shown in above figure. The flow of JSON mashups that use dynamic Script method goes in the following steps:

  1. The flow of the process starts with the browser sending request to the server by using HTTP GET.
  2. The Web Server responds with a page that includes the following couple of important JavaScript functions:

    a. A parsing function that expects JavaScript objects to be parameters.

    b. The Dynamic Script method is the core of the initiation script through which a new script tag is added to the page, specifying the source for that script tag to be the Uniform Resource Locator (URL) at some partner site.

  3. The source code for the new script tag gets loaded by the browser.

  4. Amazon receives an HTTP Get request sent from the browser using the loaded script.
  5. A JavaScript object, after being serialized into a JSON Object, is served by the partner site.
  6. A function call to the render function wraps the JSON script, and the JavaScript entirely becomes the content for the script tag.
  7. The new piece of JavaScript is tried for execution by the browser, which calls the render method from step 2(a).

  8. The server invokes the render method and evaluates the JSON script, which is converted into a JavaScript object. The data contained in the render method is pushed into the page after the render method, which uses the new JavaScript object in its execution

Please log in to add an answer.