mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Add JsonObjectSerializer::add(key, bool) overload
Without this, bools will get implicitly converted to integers, which is usually not what we want.
This commit is contained in:
parent
f91b3aab47
commit
745ea2a0ef
Notes:
sideshowbarker
2024-07-19 09:32:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/745ea2a0efd
1 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,12 @@ public:
|
|||
m_builder.append('"');
|
||||
}
|
||||
|
||||
void add(const StringView& key, bool value)
|
||||
{
|
||||
begin_item(key);
|
||||
m_builder.append(value ? "true" : "false");
|
||||
}
|
||||
|
||||
void add(const StringView& key, i32 value)
|
||||
{
|
||||
begin_item(key);
|
||||
|
|
Loading…
Reference in a new issue