syntax analysis More...
Public Types | |
| enum | parse_event_t : uint8_t { parse_event_t::object_start, parse_event_t::object_end, parse_event_t::array_start, parse_event_t::array_end, parse_event_t::key, parse_event_t::value } |
| using | parser_callback_t = std::function< bool(int depth, parse_event_t event, BasicJsonType &parsed)> |
Public Member Functions | |
| parser (detail::input_adapter_t adapter, const parser_callback_t cb=nullptr, const bool allow_exceptions_=true) | |
| a parser reading from an input adapter More... | |
| void | parse (const bool strict, BasicJsonType &result) |
| public parser interface More... | |
| bool | accept (const bool strict=true) |
| public accept interface More... | |
syntax analysis
This class implements a recursive decent parser.
|
strong |
|
inlineexplicit |
a parser reading from an input adapter
|
inline |
public parser interface
| [in] | strict | whether to expect the last token to be EOF |
| [in,out] | result | parsed JSON value |
| parse_error.101 | in case of an unexpected token |
| parse_error.102 | if to_unicode fails or surrogate error |
| parse_error.103 | if to_unicode fails |
References nlohmann::detail::discarded.

|
inline |
public accept interface
| [in] | strict | whether to expect the last token to be EOF |
References nlohmann::detail::array, nlohmann::detail::boolean, nlohmann::detail::parse_error::create(), nlohmann::detail::discarded, nlohmann::detail::null, nlohmann::detail::number_float, nlohmann::detail::number_integer, nlohmann::detail::number_unsigned, nlohmann::detail::object, and nlohmann::detail::string.

