| 8 | static const auto LOGGER = Logger("AppHubJson"); |
| 9 | |
| 10 | static bool parseEntry(const cJSON* object, AppHubEntry& entry) { |
| 11 | const json::Reader reader(object); |
| 12 | return reader.readString("appId", entry.appId) && |
| 13 | reader.readString("appVersionName", entry.appVersionName) && |
| 14 | reader.readInt32("appVersionCode", entry.appVersionCode) && |
| 15 | reader.readString("appName", entry.appName) && |
| 16 | reader.readString("appDescription", entry.appDescription) && |
| 17 | reader.readString("targetSdk", entry.targetSdk) && |
| 18 | reader.readString("file", entry.file) && |
| 19 | reader.readStringArray("targetPlatforms", entry.targetPlatforms); |
| 20 | } |
| 21 | |
| 22 | bool parseJson(const std::string& filePath, std::vector<AppHubEntry>& entries) { |
| 23 | auto lock = file::getLock(filePath)->asScopedLock(); |
no test coverage detected