diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2022-11-16 16:49:49 +0100 |
---|---|---|
committer | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2022-11-16 16:50:50 +0100 |
commit | 09f00dd4d01aa1b6866978d162022133e521614f (patch) | |
tree | 1d7470dfc9d7bb997d684294e0048280079a11a2 /src/nix/path-info.cc | |
parent | 62960f32915909a5104f2ca3a32b25fb3cfd34c7 (diff) |
Replace src/libutil/json.cc with nlohmann json generation
Diffstat (limited to 'src/nix/path-info.cc')
-rw-r--r-- | src/nix/path-info.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index d690fe594..613c5b191 100644 --- a/src/nix/path-info.cc +++ b/src/nix/path-info.cc @@ -1,12 +1,13 @@ #include "command.hh" #include "shared.hh" #include "store-api.hh" -#include "json.hh" #include "common-args.hh" #include <algorithm> #include <array> +#include <nlohmann/json.hpp> + using namespace nix; struct CmdPathInfo : StorePathsCommand, MixJSON @@ -86,11 +87,10 @@ struct CmdPathInfo : StorePathsCommand, MixJSON pathLen = std::max(pathLen, store->printStorePath(storePath).size()); if (json) { - JSONPlaceholder jsonRoot(std::cout); - store->pathInfoToJSON(jsonRoot, + std::cout << store->pathInfoToJSON( // FIXME: preserve order? StorePathSet(storePaths.begin(), storePaths.end()), - true, showClosureSize, SRI, AllowInvalid); + true, showClosureSize, SRI, AllowInvalid).dump(); } else { |