summaryrefslogtreecommitdiff
path: root/doc/classes/JSON.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/JSON.xml')
-rw-r--r--doc/classes/JSON.xml16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 9650701c49..49ebb55a52 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -50,23 +50,23 @@
</method>
<method name="parse">
<return type="int" enum="Error" />
- <argument index="0" name="json_string" type="String" />
+ <param index="0" name="json_string" type="String" />
<description>
- Attempts to parse the [code]json_string[/code] provided.
+ Attempts to parse the [param json_string] provided.
Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
</description>
</method>
<method name="stringify">
<return type="String" />
- <argument index="0" name="data" type="Variant" />
- <argument index="1" name="indent" type="String" default="&quot;&quot;" />
- <argument index="2" name="sort_keys" type="bool" default="true" />
- <argument index="3" name="full_precision" type="bool" default="false" />
+ <param index="0" name="data" type="Variant" />
+ <param index="1" name="indent" type="String" default="&quot;&quot;" />
+ <param index="2" name="sort_keys" type="bool" default="true" />
+ <param index="3" name="full_precision" type="bool" default="false" />
<description>
Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.
- [b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
- The [code]indent[/code] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
+ [b]Note:[/b] If [param full_precision] is [code]true[/code], when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
+ The [param indent] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
[b]Example output:[/b]
[codeblock]
## JSON.stringify(my_dictionary)