MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / parse

Method parse

launcher/ApplicationMessage.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#include "Json.h"
41
42void ApplicationMessage::parse(const QByteArray& input)
43{
44 auto doc = Json::requireDocument(input, "ApplicationMessage");
45 auto root = Json::requireObject(doc, "ApplicationMessage");
46
47 command = root.value("command").toString();
48 args.clear();
49
50 auto parsedArgs = root.value("args").toObject();
51 for (auto iter = parsedArgs.constBegin(); iter != parsedArgs.constEnd(); iter++) {
52 args.insert(iter.key(), iter.value().toString());
53 }
54}
55
56QByteArray ApplicationMessage::serialize()
57{

Callers

nothing calls this directly

Calls 6

requireDocumentFunction · 0.85
requireObjectFunction · 0.85
valueMethod · 0.80
insertMethod · 0.80
toStringMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected