JSONPrettify
Prettifies a JSON string.
Method Signature
JSONPrettify(var=[string])Arguments
Argument
Type
Required
Description
Default
var
string
true
The JSON string to prettify.
Examples
Prettify a JSON string
json = '{"name":"Luis","age":42}';
result = jsonPrettify( json );
writeOutput( result.contains( chr(10) ) );
Result: true
Custom indentation
json = '{"a":1,"b":2}';
result = jsonPrettify( json, " " );
writeOutput( result.contains( " " ) );
Result: true
Related
Last updated
Was this helpful?
