diff --git a/tdutils/td/utils/JsonBuilder.h b/tdutils/td/utils/JsonBuilder.h index 05d245ac1..b6b25fa7a 100644 --- a/tdutils/td/utils/JsonBuilder.h +++ b/tdutils/td/utils/JsonBuilder.h @@ -301,6 +301,13 @@ class JsonScope { JsonScope &operator<<(double x) { return *this << JsonFloat(x); } + template + JsonScope &operator<<(const char (&x)[N]) { + return *this << JsonString(Slice(x)); + } + JsonScope &operator<<(const char *x) { + return *this << JsonString(Slice(x)); + } JsonScope &operator<<(Slice x) { return *this << JsonString(x); }