mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Consolidate JSON, JSONParseResults and JSONParser into JSON
Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
This commit is contained in:
@@ -1066,11 +1066,13 @@
|
||||
<description>
|
||||
Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
|
||||
[codeblock]
|
||||
p = parse_json('["a", "b", "c"]')
|
||||
if typeof(p) == TYPE_ARRAY:
|
||||
print(p[0]) # Prints a
|
||||
var json = JSON.new()
|
||||
json.parse('["a", "b", "c"]')
|
||||
var result = json.get_data()
|
||||
if typeof(result) == TYPE_ARRAY:
|
||||
print(result[0]) # Prints a
|
||||
else:
|
||||
print("unexpected results")
|
||||
print("Unexpected result")
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -1211,9 +1213,6 @@
|
||||
<member name="InputMap" type="InputMap" setter="" getter="">
|
||||
The [InputMap] singleton.
|
||||
</member>
|
||||
<member name="JSON" type="JSON" setter="" getter="">
|
||||
The [JSON] singleton.
|
||||
</member>
|
||||
<member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter="">
|
||||
The [JavaClassWrapper] singleton.
|
||||
[b]Note:[/b] Only implemented on Android.
|
||||
|
||||
Reference in New Issue
Block a user