mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
AK+Everywhere: Store JSON object keys as String
This commit is contained in:
parent
70eb0ba1cd
commit
e591636419
Notes:
github-actions[bot]
2025-02-21 00:29:28 +00:00
Author: https://github.com/trflynn89
Commit: e591636419
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3631
Reviewed-by: https://github.com/awesomekling ✅
23 changed files with 119 additions and 111 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue