Merge pull request #813 from Blizzard/encode-pretty
Add json.encode_pretty wrapper.
This commit is contained in:
commit
b65a2b6d64
@ -33,6 +33,18 @@
|
||||
return result
|
||||
end
|
||||
|
||||
function json.encode_pretty(value)
|
||||
err = nil
|
||||
|
||||
local success, result = pcall(implementation.encode_pretty, implementation, value)
|
||||
|
||||
if not success then
|
||||
return nil, err
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
function json.decode(value)
|
||||
err = nil
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user