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/eval.cc | |
parent | 62960f32915909a5104f2ca3a32b25fb3cfd34c7 (diff) |
Replace src/libutil/json.cc with nlohmann json generation
Diffstat (limited to 'src/nix/eval.cc')
-rw-r--r-- | src/nix/eval.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix/eval.cc b/src/nix/eval.cc index ddd2790c6..ba82b5772 100644 --- a/src/nix/eval.cc +++ b/src/nix/eval.cc @@ -4,10 +4,11 @@ #include "store-api.hh" #include "eval.hh" #include "eval-inline.hh" -#include "json.hh" #include "value-to-json.hh" #include "progress-bar.hh" +#include <nlohmann/json.hpp> + using namespace nix; struct CmdEval : MixJSON, InstallableCommand @@ -115,9 +116,7 @@ struct CmdEval : MixJSON, InstallableCommand } else if (json) { - JSONPlaceholder jsonOut(std::cout); - printValueAsJSON(*state, true, *v, pos, jsonOut, context, false); - std::cout << std::endl; + std::cout << printValueAsJSON(*state, true, *v, pos, context, false).dump() << std::endl; } else { |