Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

nx.json

nx.json.encode(value, opts)

nx.json.encode(value[, opts]) -> string. opts.pretty (default false) emits a 2-space-indented, multi-line document for human-readable / diff-friendly files; omit it for the compact one-liner.

Defined in stdlib.lua.

nx.json.decode(str)

nx.json.decode(str) -> value. Parses a JSON document (objects -> string-keyed tables, arrays -> sequences, null -> nil); raises on malformed input.

Defined in stdlib.lua.