mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
52 lines
2.2 KiB
ReStructuredText
52 lines
2.2 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the JSON.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_JSON:
|
|
|
|
JSON
|
|
====
|
|
|
|
**Inherits:** :ref:`Object<class_Object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Helper class for parsing JSON data.
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`JSONParseResult<class_JSONParseResult>` | :ref:`parse<class_JSON_method_parse>` **(** :ref:`String<class_String>` json **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`print<class_JSON_method_print>` **(** :ref:`Variant<class_Variant>` value, :ref:`String<class_String>` indent="", :ref:`bool<class_bool>` sort_keys=false **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Description
|
|
-----------
|
|
|
|
Helper class for parsing JSON data. For usage example and other important hints, see :ref:`JSONParseResult<class_JSONParseResult>`.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_JSON_method_parse:
|
|
|
|
- :ref:`JSONParseResult<class_JSONParseResult>` **parse** **(** :ref:`String<class_String>` json **)**
|
|
|
|
Parses a JSON encoded string and returns a :ref:`JSONParseResult<class_JSONParseResult>` containing the result.
|
|
|
|
----
|
|
|
|
.. _class_JSON_method_print:
|
|
|
|
- :ref:`String<class_String>` **print** **(** :ref:`Variant<class_Variant>` value, :ref:`String<class_String>` indent="", :ref:`bool<class_bool>` sort_keys=false **)**
|
|
|
|
Converts a Variant var to JSON text and returns the result. Useful for serializing data to store or send over the network.
|
|
|