diff options
| author | Geequlim | 2017-11-03 15:32:58 +0800 |
|---|---|---|
| committer | Geequlim | 2017-11-07 11:52:45 +0800 |
| commit | f7168bf217f810ba7da310953c043448135d0718 (patch) | |
| tree | 0feed4a6cc25f049d248685c4d3b15f2e6c9ec00 /core/bind/core_bind.cpp | |
| parent | c880302754352dce1e44bf00bf9b1ac20e71cd1d (diff) | |
| download | godot-f7168bf217f810ba7da310953c043448135d0718.tar.gz godot-f7168bf217f810ba7da310953c043448135d0718.tar.zst godot-f7168bf217f810ba7da310953c043448135d0718.zip | |
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 12b892d87..4d6eb92b0 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2669,12 +2669,12 @@ Variant JSONParseResult::get_result() const { } void _JSON::_bind_methods() { - ClassDB::bind_method(D_METHOD("print", "value"), &_JSON::print); + ClassDB::bind_method(D_METHOD("print", "value", "indent", "sort_keys"), &_JSON::print, DEFVAL(String()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("parse", "json"), &_JSON::parse); } -String _JSON::print(const Variant &p_value) { - return JSON::print(p_value); +String _JSON::print(const Variant &p_value, const String &p_indent, bool p_sort_keys) { + return JSON::print(p_value, p_indent, p_sort_keys); } Ref<JSONParseResult> _JSON::parse(const String &p_json) { |
