1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-04 17:04:49 +00:00

Merge pull request #34566 from Heikki00/34541_to_json_precision

Increased String::num default decimal precision
This commit is contained in:
Rémi Verschelde
2021-06-11 15:56:59 +02:00
committed by GitHub
7 changed files with 47 additions and 22 deletions

View File

@@ -2420,12 +2420,12 @@ Variant JSONParseResult::get_result() const {
}
void _JSON::_bind_methods() {
ClassDB::bind_method(D_METHOD("print", "value", "indent", "sort_keys"), &_JSON::print, DEFVAL(String()), DEFVAL(false));
ClassDB::bind_method(D_METHOD("print", "value", "indent", "sort_keys", "full_precision"), &_JSON::print, DEFVAL(String()), DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("parse", "json"), &_JSON::parse);
}
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);
String _JSON::print(const Variant &p_value, const String &p_indent, bool p_sort_keys, bool p_full_precision) {
return JSON::print(p_value, p_indent, p_sort_keys, p_full_precision);
}
Ref<JSONParseResult> _JSON::parse(const String &p_json) {