AK+Everywhere: Store JSON object keys as String

This commit is contained in:
Timothy Flynn 2025-02-17 12:18:27 -05:00 committed by Tim Flynn
commit e591636419
Notes: github-actions[bot] 2025-02-21 00:29:28 +00:00
23 changed files with 119 additions and 111 deletions

View file

@ -261,9 +261,14 @@ bool JsonObject::has_object(StringView key) const
return value.has_value() && value->is_object();
}
void JsonObject::set(ByteString const& key, JsonValue value)
void JsonObject::set(String key, JsonValue value)
{
m_members.set(key, move(value));
m_members.set(move(key), move(value));
}
void JsonObject::set(StringView key, JsonValue value)
{
set(MUST(String::from_utf8(key)), move(value));
}
bool JsonObject::remove(StringView key)