aboutsummaryrefslogtreecommitdiff
path: root/src/nix/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-01-02 20:53:39 +0100
committerEelco Dolstra <edolstra@gmail.com>2023-01-02 20:53:39 +0100
commit6b6965238506705382892b14ef22700fc5112c3d (patch)
treec5a0f04bee2bace1281d7c7b405c8214641072c8 /src/nix/eval.cc
parente0ab2069c975abf80db9fdca23f0c164df921829 (diff)
parent9af16c5f742300e831a2cc400e43df1e22f87f31 (diff)
Merge remote-tracking branch 'origin/master' into coerce-string
Diffstat (limited to 'src/nix/eval.cc')
-rw-r--r--src/nix/eval.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix/eval.cc b/src/nix/eval.cc
index 23fef7c68..ccee074e9 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 {