Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 2394:bde611cbb7ae
Reordered some items in njs Compatibility.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 06 Jun 2019 20:48:15 +0300 |
parents | ea6964391d52 |
children | dbf68c949522 |
comparison
equal
deleted
inserted
replaced
2393:26fc5c8f13fd | 2394:bde611cbb7ae |
---|---|
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="27"> | 12 rev="28"> |
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 |
858 <para> | 858 <para> |
859 The <literal>JSON</literal> object (ES 5.1) provides functions | 859 The <literal>JSON</literal> object (ES 5.1) provides functions |
860 to convert njs values to and from JSON format. | 860 to convert njs values to and from JSON format. |
861 <list type="tag"> | 861 <list type="tag"> |
862 | 862 |
863 <tag-name><literal>JSON.parse(<value>string</value>[, | 863 <tag-name id="core_json_parse"><literal>JSON.parse(<value>string</value>[, |
864 <value>reviver</value>])</literal></tag-name> | 864 <value>reviver</value>])</literal></tag-name> |
865 <tag-desc> | 865 <tag-desc> |
866 Converts a <literal>string</literal> that represents JSON data | 866 Converts a <literal>string</literal> that represents JSON data |
867 into an njs object (<literal>{...}</literal>) or | 867 into an njs object (<literal>{...}</literal>) or |
868 array (<literal>[...]</literal>). | 868 array (<literal>[...]</literal>). |
869 The optional <literal>reviver</literal> parameter is a function (key, value) | 869 The optional <literal>reviver</literal> parameter is a function (key, value) |
870 that will be called for each (key,value) pair and can transform the value. | 870 that will be called for each (key,value) pair and can transform the value. |
871 </tag-desc> | 871 </tag-desc> |
872 | 872 |
873 <tag-name><literal>JSON.stringify(<value>value</value>[, | 873 <tag-name id="core_json_stringify"><literal>JSON.stringify(<value>value</value>[, |
874 <value>replacer</value>] [, <value>space</value>])</literal></tag-name> | 874 <value>replacer</value>] [, <value>space</value>])</literal></tag-name> |
875 <tag-desc> | 875 <tag-desc> |
876 Converts an njs object back to JSON. | 876 Converts an njs object back to JSON. |
877 The obligatory <literal>value</literal> parameter is generally a JSON | 877 The obligatory <literal>value</literal> parameter is generally a JSON |
878 <literal>object</literal> or <literal>array</literal> that will be converted. | 878 <literal>object</literal> or <literal>array</literal> that will be converted. |