1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-31 18:31:04 +00:00

Don't throw a error when writing JSON fails

This commit is contained in:
ShadowNinja 2013-12-18 18:17:26 -05:00
parent ba8fa0bd42
commit e1f9ba435f
3 changed files with 15 additions and 9 deletions

View file

@ -1531,7 +1531,7 @@ minetest.parse_json(string[, nullvalue]) -> something
^ On success returns a table, a string, a number, a boolean or nullvalue
^ On failure outputs an error message and returns nil
^ Example: parse_json("[10, {\"a\":false}]") -> {10, {a = false}}
minetest.write_json(data[, styled]) -> string
minetest.write_json(data[, styled]) -> string or nil and error message
^ Convert a Lua table into a JSON string
^ styled: Outputs in a human-readable format if this is set, defaults to false
^ Un-serializable things like functions and userdata are saved as null.