extendscript icon indicating copy to clipboard operation
extendscript copied to clipboard

Confused on json example

Open impactcolor opened this issue 6 years ago • 0 comments

Hi in this example what is the 1 for? Last line: alert( JSON(obj,1) )

`var obj = {
	myNumber: 12345678,
	myBool: true,
	myString: "Hello\tWorld\u00a0: This is fine!",
	myRegex: /[a-z\d]+/,
	myArray: [ ['this', 'is'], [1], ['array', 'of', 'arrays'] ],
	myObject: {a:1,b:2,c:3},
	myUnit: UnitValue(5,'mm'),
	myXML: <root><aaa xxx='yyy'>hello</aaa></root>,
	myDate: new Date,
	myFile: File("c:/test.txt"),
	myNativeObj: $.global,
	};

alert( JSON(obj,1) );`

impactcolor avatar Jan 07 '20 18:01 impactcolor