From 62273e51a252287d1c60228e8a8e8939ecaa73c6 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 8 Jan 2017 22:40:00 -0300 Subject: Moved JSON functions to built-in to_json, parse_json, validate_json --- core/dictionary.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'core/dictionary.cpp') diff --git a/core/dictionary.cpp b/core/dictionary.cpp index 94bb0b6e8c..d5d29ca0fc 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -29,7 +29,6 @@ #include "dictionary.h" #include "safe_refcount.h" #include "variant.h" -#include "io/json.h" struct _DictionaryVariantHash { @@ -277,22 +276,6 @@ const Variant* Dictionary::next(const Variant* p_key) const { return _p->variant_map.next(p_key); } - -Error Dictionary::parse_json(const String& p_json) { - - String errstr; - int errline=0; - if (p_json != ""){ - Error err = JSON::parse(p_json,*this,errstr,errline); - if (err!=OK) { - ERR_EXPLAIN("Error parsing JSON: "+errstr+" at line: "+itos(errline)); - ERR_FAIL_COND_V(err!=OK,err); - } - } - - return OK; -} - Dictionary Dictionary::copy() const { Dictionary n(is_shared()); @@ -307,11 +290,6 @@ Dictionary Dictionary::copy() const { return n; } -String Dictionary::to_json() const { - - return JSON::print(*this); -} - void Dictionary::operator=(const Dictionary& p_dictionary) { -- cgit v1.2.3