Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
detail::parser< BasicJsonType, InputAdapterType > Class Template Reference

syntax analysis More...

#include <json.hpp>

Public Member Functions

 parser (InputAdapterType &&adapter, parser_callback_t< BasicJsonType > cb=nullptr, const bool allow_exceptions_=true, const bool ignore_comments=false, const bool ignore_trailing_commas_=false)
 a parser reading from an input adapter
 
void parse (const bool strict, BasicJsonType &result)
 public parser interface
 
bool accept (const bool strict=true)
 public accept interface
 
template<typename SAX >
bool sax_parse (SAX *sax, const bool strict=true)
 

Detailed Description

template<typename BasicJsonType, typename InputAdapterType>
class detail::parser< BasicJsonType, InputAdapterType >

syntax analysis

This class implements a recursive descent parser.

Definition at line 12976 of file json.hpp.

Constructor & Destructor Documentation

◆ parser()

template<typename BasicJsonType , typename InputAdapterType >
detail::parser< BasicJsonType, InputAdapterType >::parser ( InputAdapterType && adapter,
parser_callback_t< BasicJsonType > cb = nullptr,
const bool allow_exceptions_ = true,
const bool ignore_comments = false,
const bool ignore_trailing_commas_ = false )
explicit

a parser reading from an input adapter

Definition at line 12987 of file json.hpp.

Member Function Documentation

◆ accept()

template<typename BasicJsonType , typename InputAdapterType >
bool detail::parser< BasicJsonType, InputAdapterType >::accept ( const bool strict = true)

public accept interface

Parameters
[in]strictwhether to expect the last token to be EOF
Returns
whether the input is a proper JSON text

Definition at line 13071 of file json.hpp.

◆ parse()

template<typename BasicJsonType , typename InputAdapterType >
void detail::parser< BasicJsonType, InputAdapterType >::parse ( const bool strict,
BasicJsonType & result )

public parser interface

Parameters
[in]strictwhether to expect the last token to be EOF
[in,out]resultparsed JSON value
Exceptions
parse_error.101in case of an unexpected token
parse_error.102if to_unicode fails or surrogate error
parse_error.103if to_unicode fails

Definition at line 13011 of file json.hpp.

◆ sax_parse()

template<typename BasicJsonType , typename InputAdapterType >
template<typename SAX >
bool detail::parser< BasicJsonType, InputAdapterType >::sax_parse ( SAX * sax,
const bool strict = true )

Definition at line 13079 of file json.hpp.


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