| 606 | } |
| 607 | |
| 608 | Variant JSON::parse_string(const String &p_json_string) { |
| 609 | Ref<JSON> json; |
| 610 | json.instantiate(); |
| 611 | Error error = json->parse(p_json_string); |
| 612 | ERR_FAIL_COND_V_MSG(error != Error::OK, Variant(), vformat("Parse JSON failed. Error at line %d: %s", json->get_error_line(), json->get_error_message())); |
| 613 | return json->get_data(); |
| 614 | } |
| 615 | |
| 616 | void JSON::_bind_methods() { |
| 617 | ClassDB::bind_static_method("JSON", D_METHOD("stringify", "data", "indent", "sort_keys", "full_precision"), &JSON::stringify, DEFVAL(""), DEFVAL(true), DEFVAL(false)); |
nothing calls this directly
no test coverage detected