summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-08 22:40:00 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-08 22:40:00 -0300
commit62273e51a252287d1c60228e8a8e8939ecaa73c6 (patch)
treefd39af99bc9cc1e71a623a0efda3222c3633134d /tools
parentfdc3380cf6e0d17b19bbf9458f641fd948aa2ffc (diff)
Moved JSON functions to built-in to_json, parse_json, validate_json
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp12
-rw-r--r--tools/editor/editor_import_export.cpp6
2 files changed, 13 insertions, 5 deletions
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index 986f235499..aca4a512fd 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -29,7 +29,7 @@
#include "asset_library_editor_plugin.h"
#include "editor_node.h"
#include "editor_settings.h"
-
+#include "io/json.h"
@@ -1076,8 +1076,16 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
}
print_line("response: "+itos(p_status)+" code: "+itos(p_code));
+
Dictionary d;
- d.parse_json(str);
+ {
+ Variant js;
+ String errs;
+ int errl;
+ JSON::parse(str,js,errs,errl);
+ d=js;
+ }
+
print_line(Variant(d).get_construct_string());
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index c1be2cd940..1804016f47 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -783,7 +783,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
if (atlas_valid) {
//compare options
- Dictionary options;
+ /*Dictionary options;
options.parse_json(f->get_line());
if (!options.has("lossy_quality") || float(options["lossy_quality"])!=group_lossy_quality)
atlas_valid=false;
@@ -794,7 +794,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
if (!atlas_valid)
print_line("JSON INVALID");
-
+*/
}
@@ -921,7 +921,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
options["lossy_quality"]=group_lossy_quality;
options["shrink"]=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get());
options["image_format"]=group_format;
- f->store_line(options.to_json());
+// f->store_line(options.to_json());
f->store_line(image_list_md5);
}