userver: formats::json::parser::JsonValueParser Class Reference
Loading...
Searching...
No Matches
formats::json::parser::JsonValueParser Class Referencefinal

#include <userver/formats/json/parser/parser_json.hpp>

Detailed Description

SAX-parser for formats::json::Value.

Definition at line 12 of file parser_json.hpp.

+ Inheritance diagram for formats::json::parser::JsonValueParser:

Public Types

using ResultType
 

Public Member Functions

void Null () override
 
void Bool (bool) override
 
void Int64 (int64_t) override
 
void Uint64 (uint64_t) override
 
void Double (double) override
 
void String (std::string_view) override
 
void StartObject () override
 
void Key (std::string_view key) override
 
void EndObject (size_t) override
 
void StartArray () override
 
void EndArray (size_t) override
 
std::string Expected () const override
 
void Subscribe (Subscriber< Value > &subscriber)
 
virtual void Reset ()
 
TypedParser< Value > & GetParser ()
 
virtual void EndObject ()
 
virtual void EndArray ()
 
void SetState (ParserState &state)
 

Protected Member Functions

void SetResult (Value &&value)
 
void Throw (const std::string &found)
 

Protected Attributes

ParserStateparser_state_ {nullptr}
 

Member Typedef Documentation

◆ ResultType

Definition at line 133 of file typed_parser.hpp.

Member Function Documentation

◆ Bool()

void formats::json::parser::JsonValueParser::Bool ( bool )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ Double()

void formats::json::parser::JsonValueParser::Double ( double )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ EndArray() [1/2]

virtual void formats::json::parser::BaseParser::EndArray ( )
inlinevirtualinherited

Definition at line 26 of file base_parser.hpp.

◆ EndArray() [2/2]

void formats::json::parser::JsonValueParser::EndArray ( size_t )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ EndObject() [1/2]

virtual void formats::json::parser::BaseParser::EndObject ( )
inlinevirtualinherited

Definition at line 24 of file base_parser.hpp.

◆ EndObject() [2/2]

void formats::json::parser::JsonValueParser::EndObject ( size_t )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ Expected()

std::string formats::json::parser::JsonValueParser::Expected ( ) const
overridevirtual

◆ GetParser()

TypedParser< Value > & formats::json::parser::TypedParser< Value >::GetParser ( )
inlineinherited

Returns an actual parser. It is commonly used in PushParser() to identify typed parser of a proxy parser.

Definition at line 144 of file typed_parser.hpp.

◆ Int64()

void formats::json::parser::JsonValueParser::Int64 ( int64_t )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ Key()

void formats::json::parser::JsonValueParser::Key ( std::string_view key)
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ Null()

void formats::json::parser::JsonValueParser::Null ( )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ Reset()

virtual void formats::json::parser::TypedParser< Value >::Reset ( )
inlinevirtualinherited

Resets parser's internal state. It should not call Reset() of subparsers (if any). Subparsers' Reset() should be called just before pushing it onto the stack.

Definition at line 139 of file typed_parser.hpp.

◆ SetResult()

void formats::json::parser::TypedParser< Value >::SetResult ( Value && value)
inlineprotectedinherited

Definition at line 147 of file typed_parser.hpp.

◆ SetState()

void formats::json::parser::BaseParser::SetState ( ParserState & state)
inlineinherited

Definition at line 32 of file base_parser.hpp.

◆ StartArray()

void formats::json::parser::JsonValueParser::StartArray ( )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ StartObject()

void formats::json::parser::JsonValueParser::StartObject ( )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ String()

void formats::json::parser::JsonValueParser::String ( std::string_view )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

◆ Subscribe()

void formats::json::parser::TypedParser< Value >::Subscribe ( Subscriber< Value > & subscriber)
inlineinherited

Definition at line 131 of file typed_parser.hpp.

◆ Throw()

void formats::json::parser::BaseParser::Throw ( const std::string & found)
inlineprotectedinherited

Definition at line 37 of file base_parser.hpp.

◆ Uint64()

void formats::json::parser::JsonValueParser::Uint64 ( uint64_t )
overridevirtual

Reimplemented from formats::json::parser::BaseParser.

Member Data Documentation

◆ parser_state_

ParserState* formats::json::parser::BaseParser::parser_state_ {nullptr}
protectedinherited

Definition at line 44 of file base_parser.hpp.


The documentation for this class was generated from the following file: