MySQL 9.1.0
Source Code Documentation
|
This is just a facade to the Json_schema_validator and it is used to hide the dependency on the rapidjson lib. More...
#include <json_schema.h>
Public Member Functions | |
bool | initialize (MEM_ROOT *mem_root, const char *json_schema_str, size_t json_schema_length, const JsonSchemaErrorHandler &error_handler, const JsonErrorHandler &depth_handler) |
Initialize a Json_schema_validator_impl, allocated on a given MEM_ROOT. More... | |
bool | is_valid (const char *document_str, size_t document_length, const JsonSchemaErrorHandler &error_handler, const JsonErrorHandler &depth_handler, bool *is_valid, Json_schema_validation_report *report) const |
bool | is_initialized () const |
~Json_schema_validator () | |
Private Attributes | |
Json_schema_validator_impl * | m_json_schema_validator {nullptr} |
This is just a facade to the Json_schema_validator and it is used to hide the dependency on the rapidjson lib.
Json_schema_validator::~Json_schema_validator | ( | ) |
bool Json_schema_validator::initialize | ( | MEM_ROOT * | mem_root, |
const char * | json_schema_str, | ||
size_t | json_schema_length, | ||
const JsonSchemaErrorHandler & | error_handler, | ||
const JsonErrorHandler & | depth_handler | ||
) |
Initialize a Json_schema_validator_impl, allocated on a given MEM_ROOT.
mem_root | The MEM_ROOT to allocate the validator on |
json_schema_str | A pointer to the JSON Schema |
json_schema_length | The length of the JSON Schema input |
error_handler | Error handlers to be called when parsing errors occur. |
depth_handler | Pointer to a function that should handle error occurred when depth is exceeded. |
true | on error (my_error has been called) |
|
inline |
bool Json_schema_validator::is_valid | ( | const char * | document_str, |
size_t | document_length, | ||
const JsonSchemaErrorHandler & | error_handler, | ||
const JsonErrorHandler & | depth_handler, | ||
bool * | is_valid, | ||
Json_schema_validation_report * | report | ||
) | const |
|
private |