AK+Kernel: Escape JSON keys & values

Grab the escaping logic from JSON string value serialization and use
it for serializing all keys and values.

Fixes #3917.
This commit is contained in:
Andreas Kling 2020-11-02 12:56:36 +01:00
commit 5e164052f6
Notes: sideshowbarker 2024-07-19 01:35:30 +09:00
7 changed files with 68 additions and 33 deletions

View file

@ -45,6 +45,8 @@ public:
void appendf(const char*, ...);
void appendvf(const char*, va_list);
void append_escaped_for_json(const StringView&);
template<typename... Parameters>
void appendff(StringView fmtstr, const Parameters&... parameters)
{