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

Method readJson

tests/MojangVersionFormat_test.cpp:10–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 Q_OBJECT
9
10 static QJsonDocument readJson(const QString path)
11 {
12 QFile jsonFile(path);
13 jsonFile.open(QIODevice::ReadOnly);
14 auto data = jsonFile.readAll();
15 jsonFile.close();
16 return QJsonDocument::fromJson(data);
17 }
18 static void writeJson(const char *file, QJsonDocument doc)
19 {
20 QFile jsonFile(file);

Callers

nothing calls this directly

Calls 2

fromJsonFunction · 0.85
openMethod · 0.80

Tested by

no test coverage detected