OpenMoHAA ..
Loading...
Searching...
No Matches
nlohmann::detail::parser< BasicJsonType > Class Template Reference

syntax analysis More...

#include <json.hpp>

Public Types

enum class  parse_event_t : uint8_t { read , array_end , key , value }
using parser_callback_t

Public Member Functions

*a parser reading from an input adapter parser (detail::input_adapter_t &&adapter, const parser_callback_t cb=nullptr, const bool allow_exceptions_=true)
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>
class nlohmann::detail::parser< BasicJsonType >

syntax analysis

This class implements a recursive decent parser.

Member Typedef Documentation

◆ parser_callback_t

template<typename BasicJsonType>
using nlohmann::detail::parser< BasicJsonType >::parser_callback_t
Initial value:
std::function<bool(int depth, parse_event_t event, BasicJsonType& parsed)>

Member Function Documentation

◆ accept()

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

public accept interface

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

◆ parse()

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

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

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