MCPcopy Create free account
hub / github.com/MultiMC/Launcher / serialize

Method serialize

launcher/ApplicationMessage.cpp:19–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19QByteArray ApplicationMessage::serialize() {
20 QJsonObject root;
21 root.insert("command", command);
22 QJsonObject outArgs;
23 for (auto iter = args.begin(); iter != args.end(); iter++) {
24 outArgs[iter.key()] = iter.value();
25 }
26 root.insert("args", outArgs);
27
28 QJsonDocument out;
29 out.setObject(root);
30 return out.toBinaryData();
31}

Callers 1

ApplicationMethod · 0.45

Calls 4

insertMethod · 0.80
keyMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected