Merge pull request #813 from Blizzard/encode-pretty

Add json.encode_pretty wrapper.
This commit is contained in:
Tom van Dijck 2017-06-18 12:49:29 -07:00 committed by GitHub
commit b65a2b6d64

View File

@ -33,6 +33,18 @@
return result return result
end 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) function json.decode(value)
err = nil err = nil