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

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

Detailed Description

SAX parser for arbitrary JSON values stored as RawString.

Definition at line 20 of file parser_raw_json.hpp.

Inheritance diagram for formats::json::parser::JsonRawStringParser:

Public Types

using ResultType

Public Member Functions

 JsonRawStringParser (const JsonRawStringParser &)=delete
 JsonRawStringParser (JsonRawStringParser &&)=delete
void Reset () override
void Subscribe (Subscriber< RawString > &subscriber)
TypedParser< RawString > & GetParser ()
virtual void Int64 (int64_t)
virtual void Uint64 (uint64_t)
virtual void EndObject (size_t)
virtual void EndArray (size_t)
void SetState (ParserState &state)
std::string GetCurrentPath () const

Protected Member Functions

void Null () override
void Bool (bool value) override
void Int64 (std::int64_t value) override
void Uint64 (std::uint64_t value) override
void Double (double value) override
void String (std::string_view value) override
void StartObject () override
void Key (std::string_view key) override
void EndObject () override
void StartArray () override
void EndArray () override
std::string GetPathItem () const override
std::string Expected () const override
void SetResult (RawString &&value)
void Throw (const std::string &found)

Protected Attributes

ParserStateparser_state_

Member Typedef Documentation

◆ ResultType

using formats::json::parser::TypedParser< RawString >::ResultType
inherited

Definition at line 141 of file typed_parser.hpp.

Member Function Documentation

◆ Bool()

void formats::json::parser::JsonRawStringParser::Bool ( bool value)
overrideprotectedvirtual

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

◆ Double()

void formats::json::parser::JsonRawStringParser::Double ( double value)
overrideprotectedvirtual

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

◆ EndArray() [1/2]

void formats::json::parser::JsonRawStringParser::EndArray ( )
overrideprotectedvirtual

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

◆ EndArray() [2/2]

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

Definition at line 40 of file base_parser.hpp.

◆ EndObject() [1/2]

void formats::json::parser::JsonRawStringParser::EndObject ( )
overrideprotectedvirtual

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

◆ EndObject() [2/2]

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

Definition at line 39 of file base_parser.hpp.

◆ Expected()

std::string formats::json::parser::JsonRawStringParser::Expected ( ) const
overrideprotectedvirtual

◆ GetCurrentPath()

std::string formats::json::parser::BaseParser::GetCurrentPath ( ) const
inlineinherited

Definition at line 46 of file base_parser.hpp.

◆ GetParser()

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

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

Definition at line 152 of file typed_parser.hpp.

◆ GetPathItem()

std::string formats::json::parser::JsonRawStringParser::GetPathItem ( ) const
inlineoverrideprotectedvirtual

Implements formats::json::parser::BaseParser.

Definition at line 43 of file parser_raw_json.hpp.

◆ Key()

void formats::json::parser::JsonRawStringParser::Key ( std::string_view key)
overrideprotectedvirtual

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

◆ Null()

void formats::json::parser::JsonRawStringParser::Null ( )
overrideprotectedvirtual

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

◆ Reset()

void formats::json::parser::JsonRawStringParser::Reset ( )
overridevirtual

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.

Reimplemented from formats::json::parser::TypedParser< RawString >.

◆ SetResult()

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

Definition at line 155 of file typed_parser.hpp.

◆ SetState()

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

Definition at line 42 of file base_parser.hpp.

◆ StartArray()

void formats::json::parser::JsonRawStringParser::StartArray ( )
overrideprotectedvirtual

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

◆ StartObject()

void formats::json::parser::JsonRawStringParser::StartObject ( )
overrideprotectedvirtual

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

◆ String()

void formats::json::parser::JsonRawStringParser::String ( std::string_view value)
overrideprotectedvirtual

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

◆ Subscribe()

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

Definition at line 139 of file typed_parser.hpp.

Member Data Documentation

◆ parser_state_

ParserState* formats::json::parser::BaseParser::parser_state_
protectedinherited

Definition at line 54 of file base_parser.hpp.


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