/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace AK { class JsonParser : private GenericLexer { public: explicit JsonParser(StringView input) : GenericLexer(input) { } ErrorOr parse(); private: ErrorOr parse_helper(); ErrorOr consume_and_unescape_string(); ErrorOr parse_array(); ErrorOr parse_object(); ErrorOr parse_number(); ErrorOr parse_string(); ErrorOr parse_false(); ErrorOr parse_true(); ErrorOr parse_null(); }; } #if USING_AK_GLOBALLY using AK::JsonParser; #endif