MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / fromJson

Method fromJson

app/src/API/CommandProtocol.h:77–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 bool isValid() const { return !commands.isEmpty(); }
76
77 static BatchRequest fromJson(const QJsonObject& json)
78 {
79 BatchRequest req;
80 req.id = json.value(QStringLiteral("id")).toString();
81
82 const auto commandsArray = json.value(QStringLiteral("commands")).toArray();
83 for (const auto& cmd : commandsArray)
84 req.commands.append(CommandRequest::fromJson(cmd.toObject()));
85
86 return req;
87 }
88};
89
90/**

Callers

nothing calls this directly

Calls 3

fromJsonFunction · 0.85
valueMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected