dojox.rpc.toJson
Create a JSON serialization of an object. This has support for referencing, including circular references, duplicate references, and out-of-message references id and path-based referencing is supported as well and is based on http://www.json.com/2007/10/19/json-referencing-proposal-and-library/.
parameter | type | description |
---|---|---|
it | Object | an object to be serialized. |
prettyPrint | Boolean | Optional. if true, we indent objects and arrays to make the output prettier. The variable dojo.toJsonIndentStr is used as the indent string -- to use something other than the default (tab), change that variable before calling dojo.toJson(). |
schema | Object | Optional. A JSON Schema object that can be used to advise the parsing of the JSON (defining ids, date properties, urls, etc) // Currently this provides a means for context based id handling return: a String representing the serialized version of the passed object. |