userver: userver/formats/json/parser/parser_handler.hpp Source File
Loading...
Searching...
No Matches
parser_handler.hpp
1#pragma once
2
3#include <userver/formats/json/parser/base_parser.hpp>
4#include <userver/formats/json/parser/parser_state.hpp>
5
6USERVER_NAMESPACE_BEGIN
7
8namespace formats::json::parser {
9
10class ParserHandler final {
11 public:
12 ParserHandler(BaseParser& parser);
13
14 ParserHandler(ParserState& parser_state);
15
16 bool Null();
17 bool Bool(bool b);
18 bool Int(int64_t i);
19 bool Uint(uint64_t u);
20 bool Int64(int64_t i);
21 bool Uint64(uint64_t u);
22 bool Double(double d);
23 bool StartObject();
24 bool EndObject(size_t);
25 bool StartArray();
26 bool EndArray(size_t);
27
28 bool Key(const char* c, size_t size, bool);
29 bool String(const char* c, size_t size, bool);
30 bool RawNumber(const char*, size_t, bool);
31
32 private:
33 BaseParser& parser_;
34};
35
36} // namespace formats::json::parser
37
38USERVER_NAMESPACE_END