MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / writeToJson

Method writeToJson

src/core/contest.cpp:239–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239void Contest::writeToJson(QJsonObject &out) {
240 QString version = "1.0";
241
242 WRITE_JSON(out, version);
243
244 WRITE_JSON(out, contestTitle);
245
246 QJsonArray tasks;
247
248 for (const auto &i : taskList) {
249 QJsonObject obj;
250 i->writeToJson(obj);
251 tasks.append(obj);
252 }
253
254 WRITE_JSON(out, tasks);
255
256 QJsonArray contestants;
257
258 for (const auto &i : contestantList) {
259 QJsonObject obj;
260 i->writeToJson(obj);
261 contestants.append(obj);
262 }
263
264 WRITE_JSON(out, contestants);
265}
266int Contest::readFromJson(const QJsonObject &in) {
267 QString version;
268

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected