|  | MySQL 9.5.0
    Source Code Documentation | 
This class implements a handler for use with rapidjson::Reader when we want to check if a string is a valid JSON text. More...
#include <json_syntax_check.h>
| Public Member Functions | |
| bool | StartObject () | 
| bool | EndObject (rapidjson::SizeType) | 
| bool | StartArray () | 
| bool | EndArray (rapidjson::SizeType) | 
| bool | too_deep_error_raised () const | 
| Syntax_check_handler (JsonErrorHandler m_depth_handler) | |
| Private Attributes | |
| size_t | m_depth {0} | 
| The current depth of the document.  More... | |
| bool | m_too_deep_error_raised {false} | 
| JsonErrorHandler | m_depth_handler {nullptr} | 
| Pointer to a function that should handle error occurred when depth is exceeded.  More... | |
This class implements a handler for use with rapidjson::Reader when we want to check if a string is a valid JSON text.
The handler does not build a DOM structure, so it is quicker than Json_dom::parse() in the cases where we don't care about the DOM, such as in the JSON_VALID() function.
The handler keeps track of how deeply nested the document is, and it raises an error and stops parsing when the depth exceeds JSON_DOCUMENT_MAX_DEPTH.
All the member functions follow the rapidjson convention of returning true on success and false on failure.
| 
 | explicit | 
| bool Syntax_check_handler::EndArray | ( | rapidjson::SizeType | ) | 
| bool Syntax_check_handler::EndObject | ( | rapidjson::SizeType | ) | 
| bool Syntax_check_handler::StartArray | ( | ) | 
| bool Syntax_check_handler::StartObject | ( | ) | 
| 
 | inline | 
| 
 | private | 
The current depth of the document.
| 
 | private | 
Pointer to a function that should handle error occurred when depth is exceeded.
| 
 | private |