summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorraymoo <raymoo@users.noreply.github.com>2017-04-08 01:42:59 -0700
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-04-08 10:42:59 +0200
commitfb4c730708a4140f05d2161c27e6c58bb0f72a9b (patch)
tree4b7eccd8e2a126f2c118f9fe1e9d4107490a734b /doc
parent8c8333bf68ca372853e95403d85f97068999d660 (diff)
downloadminetest-fb4c730708a4140f05d2161c27e6c58bb0f72a9b.tar.gz
minetest-fb4c730708a4140f05d2161c27e6c58bb0f72a9b.tar.bz2
minetest-fb4c730708a4140f05d2161c27e6c58bb0f72a9b.zip
Document that write_json will error on unserializable types. (#5539)
Previously it was erroneously documented that it would save them as null.
Diffstat (limited to 'doc')
-rw-r--r--doc/client_lua_api.md2
-rw-r--r--doc/lua_api.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md
index d68f90dec..bee53636c 100644
--- a/doc/client_lua_api.md
+++ b/doc/client_lua_api.md
@@ -712,7 +712,7 @@ Call these functions only at load time!
* `minetest.write_json(data[, styled])`: returns a string or `nil` and an error message
* Convert a Lua table into a JSON string
* styled: Outputs in a human-readable format if this is set, defaults to false
- * Unserializable things like functions and userdata are saved as null.
+ * Unserializable things like functions and userdata will cause an error.
* **Warning**: JSON is more strict than the Lua table format.
1. You can only use strings and positive integers of at least one as keys.
2. You can not mix string and integer keys.
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 0d3f00c67..ca1b5d14c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2709,7 +2709,7 @@ These functions return the leftover itemstack.
* `minetest.write_json(data[, styled])`: returns a string or `nil` and an error message
* Convert a Lua table into a JSON string
* styled: Outputs in a human-readable format if this is set, defaults to false
- * Unserializable things like functions and userdata are saved as null.
+ * Unserializable things like functions and userdata will cause an error.
* **Warning**: JSON is more strict than the Lua table format.
1. You can only use strings and positive integers of at least one as keys.
2. You can not mix string and integer keys.