mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Use WinRT JSON parser instead of custom cpprestsdk solution (#822)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user