mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
AK+Everywhere: Remove JsonValue APIs with implicit default values
This commit is contained in:
parent
c49819cced
commit
b5f1a48a7c
16 changed files with 132 additions and 106 deletions
|
@ -434,8 +434,8 @@ Value JSONObject::parse_json_value(VM& vm, JsonValue const& value)
|
|||
return Value(parse_json_array(vm, value.as_array()));
|
||||
if (value.is_null())
|
||||
return js_null();
|
||||
if (value.is_number())
|
||||
return Value(value.to_double(0));
|
||||
if (auto double_value = value.get_double_with_precision_loss(); double_value.has_value())
|
||||
return Value(double_value.value());
|
||||
if (value.is_string())
|
||||
return PrimitiveString::create(vm, value.as_string());
|
||||
if (value.is_bool())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue