Clarify some things in 1.5.12
This commit is contained in:
parent
15767fc3cf
commit
0be77b09a0
1 changed files with 4 additions and 1 deletions
|
@ -105,7 +105,7 @@ JSON is data-only language-independent specification, so some JavaScript-specifi
|
||||||
Namely:
|
Namely:
|
||||||
|
|
||||||
- Function properties (methods).
|
- Function properties (methods).
|
||||||
- Symbolic properties.
|
- Symbolic keys and values.
|
||||||
- Properties that store `undefined`.
|
- Properties that store `undefined`.
|
||||||
|
|
||||||
```js run
|
```js run
|
||||||
|
@ -276,6 +276,7 @@ name: John
|
||||||
name: Alice
|
name: Alice
|
||||||
place: [object Object]
|
place: [object Object]
|
||||||
number: 23
|
number: 23
|
||||||
|
occupiedBy: [object Object]
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -328,6 +329,8 @@ alert(JSON.stringify(user, null, 2));
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The third argument can also be a string. In this case, the string is used for indentation instead of a number of spaces.
|
||||||
|
|
||||||
The `space` parameter is used solely for logging and nice-output purposes.
|
The `space` parameter is used solely for logging and nice-output purposes.
|
||||||
|
|
||||||
## Custom "toJSON"
|
## Custom "toJSON"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue