Clear key after matching on it
This commit is contained in:
@@ -89,7 +89,7 @@ public:
|
||||
ArenaString current_string;
|
||||
ArenaString current_number;
|
||||
bool in_key = false;
|
||||
bool parse_error = false;
|
||||
const char *parse_error = nullptr;
|
||||
bool parse_complete = false;
|
||||
|
||||
// Current objects being parsed
|
||||
@@ -222,7 +222,15 @@ public:
|
||||
* @brief Check if there was a parse error.
|
||||
* @return true if there was a parse error
|
||||
*/
|
||||
bool has_parse_error() const { return parser_context_.parse_error; }
|
||||
bool has_parse_error() const {
|
||||
return parser_context_.parse_error != nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the parse error message if there was an error.
|
||||
* @return Error message string, or nullptr if no error
|
||||
*/
|
||||
const char *get_parse_error() const { return parser_context_.parse_error; }
|
||||
|
||||
/**
|
||||
* @brief Get the request ID if present.
|
||||
|
||||
Reference in New Issue
Block a user