summaryrefslogtreecommitdiff
path: root/AK/StringBuilder.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-02-24 19:15:31 +0200
committerAndreas Kling <kling@serenityos.org>2022-02-27 20:37:57 +0100
commit9da8c781336bf773705530646c20969df1dc4b36 (patch)
tree107b650a483262d3866dd0d8f34f1080c28e703b /AK/StringBuilder.h
parent7440b632fe074e40b1a475073ce36a3d358b2b5a (diff)
downloadserenity-9da8c781336bf773705530646c20969df1dc4b36.zip
AK: Add a try variant of StringBuilder::append_escaped_for_json
This will allow us to make a fallible version of the JSON serializers.
Diffstat (limited to 'AK/StringBuilder.h')
-rw-r--r--AK/StringBuilder.h1
1 files changed, 1 insertions, 0 deletions
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<void> try_append(char const*, size_t);
+ ErrorOr<void> try_append_escaped_for_json(StringView);
void append(StringView);
#ifndef KERNEL