System Functions
The session will have access to system functions (time, date, and so on) through the standard ECMAScript objects and functions. In addition to the core ECMAScript script functions, the JSON extensions will also be supported.
The following are the JSON-related functions that are supported:
-
JSON Function Set 1 — These functions are fast and should not be used on JSON-related data that is untrusted:
-
uneval(object) — converts object to JSON string form
-
eval(string) — converts JSON string to object form
-
JSON Function Set 2 — These functions are more secure (for example, will not run script logic) and are defined in the ECMAScript version 5 standard. This function set is based on the open source version found at: http://www.json.org/js. Note also that it is currently unable to handle cycles:
-
JSON.stringify(object, replacer function) — converts object to JSON string form
-
JSON.parse(string, replacer function) — converts JSON string to object form