Serenity Operating System
at master 20 lines 611 B view raw
1/* 2 * Copyright (c) 2022-2023, Linus Groh <linusg@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#pragma once 8 9#include <AK/Forward.h> 10#include <LibJS/Forward.h> 11#include <LibWeb/Forward.h> 12 13namespace Web::Infra { 14 15WebIDL::ExceptionOr<JS::Value> parse_json_string_to_javascript_value(JS::Realm&, StringView); 16WebIDL::ExceptionOr<JS::Value> parse_json_bytes_to_javascript_value(JS::Realm&, ReadonlyBytes); 17WebIDL::ExceptionOr<String> serialize_javascript_value_to_json_string(JS::VM&, JS::Value); 18WebIDL::ExceptionOr<ByteBuffer> serialize_javascript_value_to_json_bytes(JS::VM&, JS::Value); 19 20}