classref: Sync with current master branch (0870525)

This commit is contained in:
Godot Organization
2025-11-01 03:32:20 +00:00
parent 225ba7a50d
commit 5f7832d64a
26 changed files with 633 additions and 117 deletions

View File

@@ -229,6 +229,8 @@ Converts a :ref:`Variant<class_Variant>` var to JSON text and returns the result
The ``indent`` parameter controls if and how something is indented; its contents will be used where there should be an indent in the output. Even spaces like ``" "`` will work. ``\t`` and ``\n`` can also be used for a tab indent, or to make a newline for each indent respectively.
\ **Warning:** Non-finite numbers are not supported in JSON. Any occurrences of :ref:`@GDScript.INF<class_@GDScript_constant_INF>` will be replaced with ``1e99999``, and negative :ref:`@GDScript.INF<class_@GDScript_constant_INF>` will be replaced with ``-1e99999``, but they will be interpreted correctly as infinity by most JSON parsers. :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` will be replaced with ``null``, and it will not be interpreted as NaN in JSON parsers. If you expect non-finite numbers, consider passing your data through :ref:`from_native()<class_JSON_method_from_native>` first.
\ **Example output:**\
::