minetest.write json

Description
Returns a string or nil and an error message.
 * Converts 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.
 * 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.


 * This is due to the fact that Javascript has two distinct array and object values.