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

Function requireObject

launcher/Json.cpp:94–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 return requireDocument(FS::read(filename), what);
93}
94QJsonObject requireObject(const QJsonDocument &doc, const QString &what)
95{
96 if (!doc.isObject())
97 {
98 throw JsonException(what + " is not an object");
99 }
100 return doc.object();
101}
102QJsonArray requireArray(const QJsonDocument &doc, const QString &what)
103{
104 if (!doc.isArray())

Callers 15

parseMethod · 0.85
modrinthVersionsTaskMethod · 0.85
modrinthProjectsTaskMethod · 0.85
flameVersionsTaskMethod · 0.85
flameProjectsTaskMethod · 0.85
loadIndexedPackMethod · 0.85
loadShareCodeFunction · 0.85
loadShareCodeResponseFunction · 0.85
loadVersionLoaderFunction · 0.85
loadVersionKeepsFunction · 0.85
loadVersionDeletesFunction · 0.85
loadVersionMethod · 0.85

Calls 2

JsonExceptionClass · 0.85
objectMethod · 0.80

Tested by

no test coverage detected