Properties Methods Events Direct Link

# Class Ext.util.JSON

Package: | Ext.util
Defined In: | JSON.js
Class: | JSON
Extends: | Object

Modified version of Douglas Crockford"s json.js that doesn"t mess with the Object prototype http://www.json.org/js.html
This class is a singleton and cannot be created directly.

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| decode( `String json`, [`Boolean safe`] ) : Object Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the sa... Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set. Parameters: `json` : String The JSON string `safe` : Boolean (optional) If set to true and the JSON is malformed, null is returned. Returns: `Object` The resulting object | JSON
| encode( `Mixed o` ) : String Encodes an Object, Array or other value Encodes an Object, Array or other value Parameters: `o` : Mixed The variable to encode Returns: `String` The JSON string | JSON

## Public Events

This class has no public events.