Difference between revisions of "YTMND:API:Response Formats"

From YTMND
Jump to: navigation, search
Line 7: Line 7:
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
 
| [[w:XML|XML]] (default)
 
| [[w:XML|XML]] (default)
| Easily parsed in many languages on many platforms. It is particularly easy to use in Flash applications.
+
| Easily parsed in many languages on many platforms. It is particularly easy to use in Flash applications. Visual representation makes it easy for a person to simply view the data.
 
| http://api.ytmnd.com/site/1/basic?return=xml
 
| http://api.ytmnd.com/site/1/basic?return=xml
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"

Revision as of 03:07, October 13, 2007

Response Formats

Type Description Example
XML (default) Easily parsed in many languages on many platforms. It is particularly easy to use in Flash applications. Visual representation makes it easy for a person to simply view the data. http://api.ytmnd.com/site/1/basic?return=xml
JSON May be directly evaluated in JavaScript, and also can be parsed in many languages. http://api.ytmnd.com/site/1/basic?return=json
JavaScript Useful as the source of a script tag, it passes JSON response to the JavaScript callback function you specify. http://api.ytmnd.com/site/1/basic?return=js&callback=yourfunctionname
Serialized PHP Easily unserialized in PHP to create objects, to which the programmer can attach custom methods. Or the programmer can directly access the response data through the public properties of the objects. http://api.ytmnd.com/site/1/basic?return=phps