Class Index | File Index

Classes


Namespace JSON

JSON namespace
Defined in: json.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
JSON.parse(text, reviver)
Takes a text and an optional reviver function, and returns a JavaScript value if the text is a valid JSON text.
<static>  
JSON.stringify(value, replacer, space)
Takes a value and an optional replacer, and an optional space parameter, and returns a JSON text.
Namespace Detail
JSON
See:
http://www.json.org/
Method Detail
<static> {Object|Array} JSON.parse(text, reviver)
Takes a text and an optional reviver function, and returns a JavaScript value if the text is a valid JSON text.
Parameters:
{String} text
the JSON string to parse
{Function} reviver Optional
Function to call on each object of the resulting object to transform values. The Function will be called with three arguments - the propertys' "parent", the property name and the property value
Returns:
{Object|Array} the resulting Object or Array

<static> {String} JSON.stringify(value, replacer, space)
Takes a value and an optional replacer, and an optional space parameter, and returns a JSON text.
Parameters:
{Mixed} value
the object to be stringified
{Function|String[]} replacer Optional
Function to replace values or an Array to idenfity the properties to keep.
{Number|String} space Optional
Number of space characters or actual String to use for indentation
Returns:
{String} JSON String
See:

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Feb 03 2009 04:12:53 GMT+1100 (EST)