mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
Utilities/json: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
f63eaee20c
commit
8647743504
Notes:
sideshowbarker
2024-07-17 10:39:39 +09:00
Author: https://github.com/AtkinsSJ
Commit: 8647743504
Pull-request: https://github.com/SerenityOS/serenity/pull/16627
Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ JsonValue query(JsonValue const& value, Vector<StringView>& key_parts, size_t ke
|
|||
|
||||
JsonValue result {};
|
||||
if (value.is_object()) {
|
||||
result = value.as_object().get_deprecated(key);
|
||||
result = value.as_object().get(key).value_or({});
|
||||
} else if (value.is_array()) {
|
||||
auto key_as_index = key.to_int();
|
||||
if (key_as_index.has_value())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue