MySQL 9.1.0
Source Code Documentation
Json_schema_validator Class Reference

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_implm_json_schema_validator {nullptr}
 

Detailed Description

This is just a facade to the Json_schema_validator and it is used to hide the dependency on the rapidjson lib.

Constructor & Destructor Documentation

◆ ~Json_schema_validator()

Json_schema_validator::~Json_schema_validator ( )

Member Function Documentation

◆ initialize()

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.

Parameters
mem_rootThe MEM_ROOT to allocate the validator on
json_schema_strA pointer to the JSON Schema
json_schema_lengthThe length of the JSON Schema input
error_handlerError handlers to be called when parsing errors occur.
depth_handlerPointer to a function that should handle error occurred when depth is exceeded.
Return values
trueon error (my_error has been called)

◆ is_initialized()

bool Json_schema_validator::is_initialized ( ) const
inline

◆ is_valid()

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

Member Data Documentation

◆ m_json_schema_validator

Json_schema_validator_impl* Json_schema_validator::m_json_schema_validator {nullptr}
private

The documentation for this class was generated from the following files: