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

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

Detailed Description

SAX parser for JSON string values.

Definition at line 14 of file string_parser.hpp.

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

Public Types

using ResultType
 

Public Member Functions

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

Protected Member Functions

void String (std::string_view sw) override
 
std::string GetPathItem () const override
 
std::string Expected () const override
 
void SetResult (std::string &&value)
 
void Throw (const std::string &found)
 

Protected Attributes

ParserStateparser_state_
 

Member Typedef Documentation

◆ ResultType

using formats::json::parser::TypedParser< std::string >::ResultType
inherited

Definition at line 141 of file typed_parser.hpp.

Member Function Documentation

◆ EndArray()

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

Definition at line 40 of file base_parser.hpp.

◆ EndObject()

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::StringParser::Expected ( ) const
overrideprotectedvirtual

◆ GetCurrentPath()

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

Definition at line 46 of file base_parser.hpp.

◆ GetParser()

TypedParser< std::string > & formats::json::parser::TypedParser< std::string >::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::StringParser::GetPathItem ( ) const
inlineoverrideprotectedvirtual

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

Definition at line 21 of file string_parser.hpp.

◆ Reset()

virtual void formats::json::parser::TypedParser< std::string >::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 147 of file typed_parser.hpp.

◆ SetResult()

void formats::json::parser::TypedParser< std::string >::SetResult ( std::string && 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.

◆ String()

void formats::json::parser::StringParser::String ( std::string_view sw)
overrideprotectedvirtual

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

◆ Subscribe()

void formats::json::parser::TypedParser< std::string >::Subscribe ( Subscriber< std::string > & 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: