From 9da8c781336bf773705530646c20969df1dc4b36 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Thu, 24 Feb 2022 19:15:31 +0200 Subject: AK: Add a try variant of StringBuilder::append_escaped_for_json This will allow us to make a fallible version of the JSON serializers. --- AK/StringBuilder.h | 1 + 1 file changed, 1 insertion(+) (limited to 'AK/StringBuilder.h') diff --git a/AK/StringBuilder.h b/AK/StringBuilder.h index 869c20446c..9021e79eec 100644 --- a/AK/StringBuilder.h +++ b/AK/StringBuilder.h @@ -35,6 +35,7 @@ public: return vformat(*this, fmtstr.view(), variadic_format_params); } ErrorOr try_append(char const*, size_t); + ErrorOr try_append_escaped_for_json(StringView); void append(StringView); #ifndef KERNEL -- cgit v1.2.3