mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Utilities/json: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
f63eaee20c
commit
8647743504
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 {};
|
JsonValue result {};
|
||||||
if (value.is_object()) {
|
if (value.is_object()) {
|
||||||
result = value.as_object().get_deprecated(key);
|
result = value.as_object().get(key).value_or({});
|
||||||
} else if (value.is_array()) {
|
} else if (value.is_array()) {
|
||||||
auto key_as_index = key.to_int();
|
auto key_as_index = key.to_int();
|
||||||
if (key_as_index.has_value())
|
if (key_as_index.has_value())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue