json

TwitterFacebook
Get flash to fully experience Pearltrees

What in the heck is JSONP and why would you use it? | InsideRIA

About You have arrived at this page because InsideRIA is no longer an active website, as of January 31, 2011. While we're sad to see the change, we think you will find the resources and community here at oreilly.com helpful. An archive of the material previously posted on InsideRIA can be found at DevelopRIA.com . O'Reilly Answers is an excellent resource for getting information about everything technology related. http://oreilly.com/insideria/index.html
The browser security model dictates that XMLHttpRequest, frames, etc. must have the same domain in order to communicate. That's not a terrible idea, for security reasons, but it sure does make distributed (service oriented, mash-up, whatever it's called this week) web development suck. Remote host needs to deploy a crossdomain.xml file, Flash is relatively proprietary and opaque to use, requires learning a one-off moving target programming langage. I'm proposing a new technology agnostic standard methodology for the script tag method for cross-domain data fetching: JSON with Padding , or simply JSONP . http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/

from __future__ import * » Remote JSON - JSONP

Note: Some of the example code presented below uses the JSON Parser and Prototype Framework . You may need to grab yourself a copy of each if you want to follow along. The Concept Just to make sure we’re all on the same page, let’s do a quick rundown of why it’s important to figure out how to load a JSON object on page load.

Loading Content with JSON

http://particletree.com/features/loading-content-with-json/
http://www.hunlock.com/blogs/Mastering_JSON_(_JavaScript_Object_Notation_) Widely hailed as the successor to XML in the browser, JSON aspires to be nothing more than a simple, and elegant data format for the exchange of information between the browser and server; and in doing this simple task it will usher in the next version of the World Wide Web itself. It may not look like much, but those squiggly braces have the potential to record every bit of information humanity has ever gathered, and express the most complex programs computer scientists can dream up. In fact, Javascript itself is stored inside a set of squiggly braces just like that, as are all of its primitive data types -- strings, numbers, arrays, dates, regular expressions, they're all objects and they all started out just like myFirstObject.

Mastering JSON ( JavaScript Object Notation )