diff --git a/tdutils/td/utils/JsonBuilder.h b/tdutils/td/utils/JsonBuilder.h index 9e61ea05..4ae07239 100644 --- a/tdutils/td/utils/JsonBuilder.h +++ b/tdutils/td/utils/JsonBuilder.h @@ -738,9 +738,9 @@ inline Result json_decode(MutableSlice from) { template StrT json_encode(const ValT &val) { - auto buf_len = 1 << 19; + auto buf_len = 1 << 18; auto buf = StackAllocator::alloc(buf_len); - JsonBuilder jb(StringBuilder(buf.as_slice())); + JsonBuilder jb(StringBuilder(buf.as_slice(), true)); jb.enter_value() << val; LOG_IF(ERROR, jb.string_builder().is_error()) << "JSON buffer overflow"; auto slice = jb.string_builder().as_cslice();