MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / writeJson

Method writeJson

tests/MojangVersionFormat_test.cpp:18–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 return QJsonDocument::fromJson(data);
17 }
18 static void writeJson(const char *file, QJsonDocument doc)
19 {
20 QFile jsonFile(file);
21 jsonFile.open(QIODevice::WriteOnly | QIODevice::Text);
22 auto data = doc.toJson(QJsonDocument::Indented);
23 qDebug() << QString::fromUtf8(data);
24 jsonFile.write(data);
25 jsonFile.close();
26 }
27
28private
29slots:

Callers

nothing calls this directly

Calls 3

openMethod · 0.80
toJsonMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected