CUBRID Engine  latest
JSON_VALIDATOR Class Reference
Collaboration diagram for JSON_VALIDATOR:
Collaboration graph

Public Member Functions

 JSON_VALIDATOR (const char *schema_raw)
 
 JSON_VALIDATOR (const JSON_VALIDATOR &copy)
 
JSON_VALIDATORoperator= (const JSON_VALIDATOR &copy)
 
 ~JSON_VALIDATOR ()
 
int load ()
 
int validate (const JSON_DOC *doc) const
 
const char * get_schema_raw () const
 

Private Member Functions

void generate_schema_validator (void)
 

Private Attributes

rapidjson::Document m_document
 
rapidjson::SchemaDocument * m_schema
 
rapidjson::SchemaValidator * m_validator
 
char * m_schema_raw
 
bool m_is_loaded
 

Detailed Description

Definition at line 288 of file db_json.cpp.

Constructor & Destructor Documentation

JSON_VALIDATOR::JSON_VALIDATOR ( const char *  schema_raw)
explicit

Definition at line 787 of file db_json.cpp.

References m_schema_raw, and strdup().

Referenced by db_json_copy_validator(), and db_json_load_validator().

Here is the caller graph for this function:

JSON_VALIDATOR::JSON_VALIDATOR ( const JSON_VALIDATOR copy)
JSON_VALIDATOR::~JSON_VALIDATOR ( void  )

Definition at line 799 of file db_json.cpp.

References m_schema, m_schema_raw, m_validator, and NULL.

Referenced by operator=().

Here is the caller graph for this function:

Member Function Documentation

void JSON_VALIDATOR::generate_schema_validator ( void  )
private

Definition at line 880 of file db_json.cpp.

References m_document, m_schema, and m_validator.

Referenced by JSON_VALIDATOR(), and load().

Here is the caller graph for this function:

const char * JSON_VALIDATOR::get_schema_raw ( ) const

Definition at line 918 of file db_json.cpp.

References m_schema_raw.

Referenced by db_json_are_validators_equal(), and db_json_get_schema_raw_from_validator().

Here is the caller graph for this function:

int JSON_VALIDATOR::load ( )

Definition at line 825 of file db_json.cpp.

References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_JSON_INVALID_JSON, er_set(), generate_schema_validator(), m_document, m_is_loaded, m_schema_raw, NO_ERROR, and NULL.

Referenced by db_json_load_validator().

Here is the caller graph for this function:

JSON_VALIDATOR & JSON_VALIDATOR::operator= ( const JSON_VALIDATOR copy)

Definition at line 868 of file db_json.cpp.

References ~JSON_VALIDATOR().

int JSON_VALIDATOR::validate ( const JSON_DOC doc) const

Definition at line 891 of file db_json.cpp.

References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_JSON_INVALIDATED_BY_SCHEMA, er_set(), m_schema_raw, m_validator, NO_ERROR, and NULL.

Referenced by db_json_validate_doc().

Here is the caller graph for this function:

Member Data Documentation

rapidjson::Document JSON_VALIDATOR::m_document
private

Definition at line 303 of file db_json.cpp.

Referenced by generate_schema_validator(), JSON_VALIDATOR(), and load().

bool JSON_VALIDATOR::m_is_loaded
private

Definition at line 307 of file db_json.cpp.

Referenced by JSON_VALIDATOR(), and load().

rapidjson::SchemaDocument* JSON_VALIDATOR::m_schema
private

Definition at line 304 of file db_json.cpp.

Referenced by generate_schema_validator(), JSON_VALIDATOR(), and ~JSON_VALIDATOR().

char* JSON_VALIDATOR::m_schema_raw
private

Definition at line 306 of file db_json.cpp.

Referenced by get_schema_raw(), JSON_VALIDATOR(), load(), validate(), and ~JSON_VALIDATOR().

rapidjson::SchemaValidator* JSON_VALIDATOR::m_validator
private

Definition at line 305 of file db_json.cpp.

Referenced by generate_schema_validator(), JSON_VALIDATOR(), validate(), and ~JSON_VALIDATOR().


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