MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / to_json

Method to_json

utility/import_exporter.cpp:2544–2578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2542}
2543
2544Dictionary ImportExporterReport::to_json() const {
2545 auto vec_to_json_array = [](const Vector<Ref<ExportReport>> &vec) -> Array {
2546 Array arr;
2547 for (auto &info : vec) {
2548 arr.append(info->to_json());
2549 }
2550 return arr;
2551 };
2552 Dictionary json;
2553
2554 json["report_version"] = REPORT_VERSION;
2555 json["gdre_version"] = gdre_version;
2556 json["game_name"] = game_name;
2557 json["output_dir"] = output_dir;
2558 json["ver"] = ver->as_text();
2559 json["had_encryption_error"] = had_encryption_error;
2560 json["godotsteam_detected"] = godotsteam_detected;
2561 json["mono_detected"] = mono_detected;
2562 json["custom_version_detected"] = custom_version_detected;
2563 json["exported_scenes"] = exported_scenes;
2564 json["show_headless_warning"] = show_headless_warning;
2565 json["session_files_total"] = session_files_total;
2566 json["log_file_location"] = log_file_location;
2567 json["decompiled_scripts"] = decompiled_scripts;
2568 json["failed_scripts"] = failed_scripts;
2569 json["translation_export_message"] = translation_export_message;
2570 json["failed"] = vec_to_json_array(failed);
2571 json["success"] = vec_to_json_array(success);
2572 json["not_converted"] = vec_to_json_array(not_converted);
2573 json["failed_plugin_cfg_create"] = failed_plugin_cfg_create;
2574 json["failed_gdnative_copy"] = failed_gdnative_copy;
2575 json["unsupported_types"] = unsupported_types;
2576 json["downloaded_plugins"] = vector_to_typed_array(downloaded_plugins);
2577 return json;
2578}
2579
2580String ImportExporterReport::_to_string() {
2581 return JSON::stringify(to_json(), "", false, true);

Callers 2

export_importsMethod · 0.45
test_exported_projectMethod · 0.45

Calls 2

vector_to_typed_arrayFunction · 0.85
as_textMethod · 0.45

Tested by 1

test_exported_projectMethod · 0.36