aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/value-to-json.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-30 00:41:18 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-30 00:41:18 +0200
commitd61853430a3df8914995ae35ac7a0795827d7a87 (patch)
treecf84b255979112cd4cbf8672578c49e78d23ab64 /src/libexpr/value-to-json.hh
parentf77be20c16621a8e6b91f95cad9711b87d113485 (diff)
Support control characters in JSON output
Diffstat (limited to 'src/libexpr/value-to-json.hh')
-rw-r--r--src/libexpr/value-to-json.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libexpr/value-to-json.hh b/src/libexpr/value-to-json.hh
index e3a97efe4..f6796f205 100644
--- a/src/libexpr/value-to-json.hh
+++ b/src/libexpr/value-to-json.hh
@@ -36,6 +36,11 @@ struct JSONObject
attr(s);
escapeJSON(str, t);
}
+ void attr(const string & s, int n)
+ {
+ attr(s);
+ str << n;
+ }
};
struct JSONList