mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Fix DerivationOptions JSON implementation and test
This commit is contained in:
parent
9daef9cca2
commit
d05e85e5be
11 changed files with 326 additions and 18 deletions
|
|
@ -91,14 +91,7 @@ Strings getStringList(const nlohmann::json & value)
|
|||
|
||||
StringMap getStringMap(const nlohmann::json & value)
|
||||
{
|
||||
auto & jsonObject = getObject(value);
|
||||
|
||||
StringMap stringMap;
|
||||
|
||||
for (const auto & [key, value] : jsonObject)
|
||||
stringMap[getString(key)] = getString(value);
|
||||
|
||||
return stringMap;
|
||||
return getMap<std::string, std::less<>>(getObject(value), getString);
|
||||
}
|
||||
|
||||
StringSet getStringSet(const nlohmann::json & value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue