From d61853430a3df8914995ae35ac7a0795827d7a87 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 30 Sep 2014 00:41:18 +0200 Subject: Support control characters in JSON output --- src/libexpr/value-to-json.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libexpr/value-to-json.hh') diff --git a/src/libexpr/value-to-json.hh b/src/libexpr/value-to-json.hh index e3a97efe4269..f6796f2053e9 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 -- cgit 1.4.1