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

Function libDownloadInfoToJson

launcher/minecraft/MojangVersionFormat.cpp:131–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131QJsonObject libDownloadInfoToJson(MojangLibraryDownloadInfo::Ptr libinfo)
132{
133 QJsonObject out;
134 if(libinfo->artifact)
135 {
136 out.insert("artifact", downloadInfoToJson(libinfo->artifact));
137 }
138 if(libinfo->classifiers.size())
139 {
140 QJsonObject classifiersOut;
141 for(auto iter = libinfo->classifiers.begin(); iter != libinfo->classifiers.end(); iter++)
142 {
143 classifiersOut.insert(iter.key(), downloadInfoToJson(iter.value()));
144 }
145 out.insert("classifiers", classifiersOut);
146 }
147 return out;
148}
149
150QJsonObject assetIndexToJson(MojangAssetIndexInfo::Ptr info)
151{

Callers 1

libraryToJsonMethod · 0.85

Calls 5

downloadInfoToJsonFunction · 0.85
insertMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected