js.toJson

From Web Computing Documentation
Revision as of 10:58, 11 July 2011 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Converts a JavaScript object to a JSON string.

js.toJson( object )


object A JavaScript object.

The function may be used to save object data into the output stream or to display debug messages representing an object.

Examples

var tempResult = Calculate(input);            //the Calculate function returns an object
var tempResultJson = js.toJson(tempResult);
js.output.write("solution", tempResultJson);  //js.output.write has a string argument
Personal tools
Modules