Use WinRT JSON parser instead of custom cpprestsdk solution (#822)

This commit is contained in:
yuyoyuppe
2019-12-06 11:40:23 +03:00
committed by GitHub
parent e714cb9e8b
commit 7357e40d3f
41 changed files with 488 additions and 15702 deletions

View File

@@ -23,3 +23,12 @@ PowertoyModule load_powertoy(const std::wstring& filename) {
module->register_system_menu_helper(&SystemMenuHelperInstace());
return PowertoyModule(module, handle);
}
json::JsonObject PowertoyModule::json_config() const {
int size = 0;
module->get_config(nullptr, &size);
std::wstring result;
result.resize(size - 1);
module->get_config(result.data(), &size);
return json::JsonObject::Parse(result);
}