mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +00:00
AK+Everywhere: Store JSON strings as String
This commit is contained in:
parent
e591636419
commit
bc54c0cdfb
Notes:
github-actions[bot]
2025-02-21 00:29:21 +00:00
Author: https://github.com/trflynn89
Commit: bc54c0cdfb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3631
Reviewed-by: https://github.com/awesomekling ✅
33 changed files with 163 additions and 152 deletions
|
@ -40,7 +40,7 @@ static ErrorOr<PropertyType, WebDriver::Error> get_property(JsonObject const& pa
|
|||
if constexpr (IsSame<PropertyType, ByteString>) {
|
||||
if (!property->is_string())
|
||||
return WebDriver::Error::from_code(ErrorCode::InvalidArgument, ByteString::formatted("Property '{}' is not a String", key));
|
||||
return property->as_string();
|
||||
return property->as_string().to_byte_string();
|
||||
} else if constexpr (IsSame<PropertyType, bool>) {
|
||||
if (!property->is_bool())
|
||||
return WebDriver::Error::from_code(ErrorCode::InvalidArgument, ByteString::formatted("Property '{}' is not a Boolean", key));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue