var JSONObject = {
stringProp: 'stringProp',
booleanProp: false,
intProp: 8
}
var JSONString = JSON.stringify(JSONObject, null, 2);
console.log(JSONString);
/* output:
* {
* "stringProp": "stringProp",
* "booleanProp": false,
* "intProp": 8
* }
*/