json.json.pretty
Declaration
lua
json.pretty(data)
Description
Pretty-print JSON with indentation and sorted keys.
Parameters
`data` (table or JSON string)
Return Values
`string` — formatted JSON
Example
lua
local s = json.pretty({a=1, b=2})