syntax analysis More...
Collaboration diagram for nlohmann::detail::parser< BasicJsonType, InputAdapterType >:Public Member Functions | |
| template<typename SAX > | |
| __attribute__ ((__nonnull__(2))) bool sax_parse(SAX *sax | |
| bool | accept (const bool strict=true) |
| public accept interface More... | |
| void | parse (const bool strict, BasicJsonType &result) |
| public parser interface More... | |
| parser (InputAdapterType &&adapter, const parser_callback_t< BasicJsonType > cb=nullptr, const bool allow_exceptions_=true, const bool skip_comments=false) | |
| a parser reading from an input adapter | |
Public Attributes | |
| const bool | allow_exceptions = true |
| whether to throw exceptions in case of errors | |
| token_type | last_token = token_type::uninitialized |
| the type of the last read token | |
| lexer_t | m_lexer |
| the lexer | |
| const bool | strict |
syntax analysis
This class implements a recursive descent parser.
| bool nlohmann::detail::parser< BasicJsonType, InputAdapterType >::accept | ( | const bool | strict = true | ) |
public accept interface
| [in] | strict | whether to expect the last token to be EOF |
| void nlohmann::detail::parser< BasicJsonType, InputAdapterType >::parse | ( | const bool | strict, |
| BasicJsonType & | result | ||
| ) |
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 |