stringify JSON
converts a data structure to a JSON string
(
any x,
boolean pretty_print=true,
function date_encoder=nil,
function binary_encoder=nil
) -> string
Encodes x to a JSON string. The returned string uses the encoding conventions given in the arguments.
Values not representable in JSON such as functions, NaN, Infinity, and -Infinity are encoded as null.
Parameters
| Name | Type | Description |
|---|---|---|
x |
any | The JSON string to parse |
Pretty Print |
boolean |
When true, whitespace is inserted to improve the readability of the resulting JSON string. |
Date Encoder |
function |
A function If The underlying pattern
is: The default encoding results in strings of the form: |
Binary Encoder |
function |
A function If |