dojo.fromJson¶
Available: | since v0.9 |
---|
Contents
Parses a JSON string to return a JavaScript object.
Introduction¶
This function creates a JavaScript object from a passed JSON string, such as one created by dojo.toJson or the response data from an Ajax call with handleAs:"json"
enabled.
1 2 3 4 5 6 7 | dojo.xhrGet({
url:"foo.php", handleAs:"json",
load: function(data){
// data is a JavaScript object. The content of foo.php
// was passed through dojo.fromJson
}
});
|