Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 2313:35b02ed44e4a
Removed example from JSON.stringify in njs reference.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 25 Dec 2018 16:42:05 +0300 |
parents | 1a6524706c70 |
children | ae56e4613280 |
comparison
equal
deleted
inserted
replaced
2312:1a6524706c70 | 2313:35b02ed44e4a |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="17"> | 12 rev="18"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
988 1 | 988 1 |
989 | 989 |
990 >> JSON.stringify(json) | 990 >> JSON.stringify(json) |
991 '{"a":1,"b":true}' | 991 '{"a":1,"b":true}' |
992 | 992 |
993 >> JSON.stringify(json, undefined, 1) | |
994 '{\n "a": 1,\n "b": true\n}' | |
995 | |
996 >> JSON.stringify({ x: [10, undefined, function(){}] }) | 993 >> JSON.stringify({ x: [10, undefined, function(){}] }) |
997 '{"x":[10,null,null]}' | 994 '{"x":[10,null,null]}' |
998 | 995 |
999 >> JSON.stringify({"a":1, "toJSON": function() {return "xxx"}}) | 996 >> JSON.stringify({"a":1, "toJSON": function() {return "xxx"}}) |
1000 '"xxx"' | 997 '"xxx"' |