json
JSON text to and from script values. Its null keeps nil through a round trip.
On this page
JSON text to and from script values. Its null keeps nil through a round trip.
2 functions, 0 constants. Scripts reach it as json::.
Functions
Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.
| function | acts on | what it does |
|---|---|---|
encode(any) -> string |
— | A value written back out as JSON text; NaN, infinity, a node or a callback has no JSON form and is an error. |
parse(string) -> any |
— | The value a JSON document describes; nil for text that does not parse, as for null. |