AK+Everywhere: Remove now-unecessary use of ByteString with JSON types

This removes JsonObject::get_byte_string and JsonObject::to_byte_string.
This commit is contained in:
Timothy Flynn 2025-02-17 15:04:56 -05:00 committed by Tim Flynn
parent 4791ec35bf
commit 2c03de60da
Notes: github-actions[bot] 2025-02-21 00:28:59 +00:00
17 changed files with 67 additions and 86 deletions

View file

@ -15,9 +15,9 @@
namespace Web::Bindings {
#define JWK_PARSE_STRING_PROPERTY(name) \
if (json_object.has_string(#name##sv)) { \
key.name = MUST(String::from_byte_string(*json_object.get_byte_string(#name##sv))); \
#define JWK_PARSE_STRING_PROPERTY(name) \
if (auto value = json_object.get_string(#name##sv); value.has_value()) { \
key.name = value.release_value(); \
}
JS::ThrowCompletionOr<JsonWebKey> JsonWebKey::parse(JS::Realm& realm, ReadonlyBytes data)