mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Consolidate JSON, JSONParseResults and JSONParser into JSON
Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
This commit is contained in:
parent
df170c8af0
commit
2bafcd3422
25 changed files with 188 additions and 430 deletions
|
@ -31,7 +31,6 @@
|
|||
#include "gdscript_language_protocol.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/json.h"
|
||||
#include "editor/doc_tools.h"
|
||||
#include "editor/editor_log.h"
|
||||
#include "editor/editor_node.h"
|
||||
|
@ -194,7 +193,7 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) {
|
|||
vformat("GDScriptLanguageProtocol: Can't initialize invalid peer '%d'.", latest_client_id));
|
||||
Ref<LSPeer> peer = clients.get(latest_client_id);
|
||||
if (peer != nullptr) {
|
||||
String msg = JSON::print(request);
|
||||
String msg = Variant(request).to_json_string();
|
||||
msg = format_output(msg);
|
||||
(*peer)->res_queue.push_back(msg.utf8());
|
||||
}
|
||||
|
@ -280,7 +279,7 @@ void GDScriptLanguageProtocol::notify_client(const String &p_method, const Varia
|
|||
ERR_FAIL_COND(peer == nullptr);
|
||||
|
||||
Dictionary message = make_notification(p_method, p_params);
|
||||
String msg = JSON::print(message);
|
||||
String msg = Variant(message).to_json_string();
|
||||
msg = format_output(msg);
|
||||
peer->res_queue.push_back(msg.utf8());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue