From 5526027b87eaf35b692f2a069e1025c0adf6a93b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 1 Feb 2024 11:35:45 -0800 Subject: JSON: Add simple printing and creation (#6265) --- src/support/json.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/support/json.h') diff --git a/src/support/json.h b/src/support/json.h index bc880f382..c005543f6 100644 --- a/src/support/json.h +++ b/src/support/json.h @@ -54,6 +54,8 @@ struct Value { Ref& operator[](IString x) { return (*this->get())[x]; } }; + template static Ref make(T t) { return Ref(new Value(t)); } + enum Type { String = 0, Number = 1, -- cgit v1.2.3