Add json.encode_pretty wrapper.

This commit is contained in:
Tom van Dijck 2017-05-24 15:31:53 -07:00
parent 6907f6785c
commit dfc5fd64c3

View File

@ -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