...
The encode()
operator returns a string containing the JSON representation of the data structure to which it is applied. For example:
|
|
|
|
|
|
|
The encode()
operator takes an optional positive integer argument specifying that the object should be pretty printed (if it contains or is a map or array) with newlines and indents with that number of spaces.
...