-
Notifications
You must be signed in to change notification settings - Fork 1
deltachaos edited this page Mar 20, 2011
·
4 revisions
Core metodes of the App object
This example show how to encode a JavaScript Object to a Json String.
Note: This Metode try's to use the json2.js library and fallback to native support ({foo: 'baa'}).toSource() if exists
alert(App.jsonEncode({
foo: baa
}));
/* This shows a alert with: '{"foo":"baa"}' */
This example show how to decode a Json String to it's JavaScript representation.
Note: This Metode try's to use the json2.js library and fallback to jQuery.parseJSON() or eval()
var obj # App.jsonDecode('{"foo":"baa"');
App.jsonEncode(value, space, reviver)
Note: See json2.js for details
App.jsonDecode(text, reviver)
Note: See json2.js for details