about summary refs log tree commit diff
path: root/src/libexpr/value-to-json.hh
diff options
context:
space:
mode:
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 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