forked from avoidwork/abaaso
-
Notifications
You must be signed in to change notification settings - Fork 0
json
avoidwork edited this page Apr 24, 2012
·
1 revision
Symantec wrappers for native JSON methods.
var obj = $.decode("[{\"abc\":true}]");
Decodes the stringified JSON argument
@param {String} arg String to parse
@param {Boolean} silent [Optional] Silently fail
@return {Mixed} Entity resulting from parsing JSON, or undefined
Example
var result = $.json.decode("{\"prop\":\"value\"}");
Encodes the argument as JSON
@param {Mixed} arg Entity to encode
@param {Boolean} silent [Optional] Silently fail
@return {String} JSON, or undefined
Example
var result = $.json.encode([1,2,3,4,5]);