Class Ext.util.JSON
Package: | Ext.util |
Class: | JSON |
Extends: | Object |
Defined In: | JSON.js |
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.
属性
-
方法
-
事件
公共属性
此类没有公共属性。
公共方法
|
decode(String json ) : Object |
JSON |
Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError. |
|
encode(Mixed o ) : String |
JSON |
Encodes an Object, Array or other value |
公共事件
此类没有公共事件。
方法详情
decode
public function decode(String json
)
Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError.
参数:
json
: StringThe JSON string
返回:
Object
The resulting object
This method is defined by JSON.
encode
public function encode(Mixed o
)
Encodes an Object, Array or other value
参数:
o
: MixedThe variable to encode
返回:
This method is defined by JSON.