JSON.parseSafe

Parses a JSON string into a JavaScript value or object. This version returns null on failure rather than throwing an exception.

The parsing operation checks for invalid characters and executable code in the JSON string. If that or actual eval of the JSON fails null is returned from the method call.

o.JSON.parseSafe(text)                                                      

Parameters

text
The JSON text to parse.

See also:

Class JSON


  Last Updated: 1/7/2008 | © West Wind Technologies, 2008