diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-26T16·55+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-29T15·29+0200 |
commit | c0a7b84748d5e27e6804117b8a57ce71269c3c66 (patch) | |
tree | 40f22e1dd5636673f764bc1f289ab254971ca95d /src/libexpr/value.hh | |
parent | 9fa21765e7f267efcc65e1aa6ab21402ea6125ad (diff) |
nix path-info: Add --json flag
Also, factor out JSON generation from value-to-json.{cc,hh}, and support producing indented JSON.
Diffstat (limited to 'src/libexpr/value.hh')
-rw-r--r-- | src/libexpr/value.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index 62bdd9281f08..f5e485748812 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/value.hh @@ -36,6 +36,7 @@ class Symbol; struct Pos; class EvalState; class XMLWriter; +class JSONPlaceholder; typedef long NixInt; @@ -73,7 +74,7 @@ class ExternalValueBase /* Print the value as JSON. Defaults to unconvertable, i.e. throws an error */ virtual void printValueAsJSON(EvalState & state, bool strict, - std::ostream & str, PathSet & context) const; + JSONPlaceholder & out, PathSet & context) const; /* Print the value as XML. Defaults to unevaluated */ virtual void printValueAsXML(EvalState & state, bool strict, bool location, |