Arguments
string
required
JSON string to parse before formatting. The function reads this argument with string type checking.
EncodeOptions
Optional encode options passed to the re-encode step. json.format reads the same encode options as json.encode, then forces pretty to true.
DecodeOptions
Optional decode options used while parsing the input JSON. A boolean sets useNull. A table can set useNull and maxDepth.
Returns
string
Readable formatted JSON string produced after parsing and re-encoding the input.