|
KiCad PCB EDA Suite
|
Code outside of kicommon must validate through this class rather than instantiating nlohmann::json_schema::json_validator, whose static library objects carry nlohmann::json definitions that collide under MSVC with the ones kicommon.dll exports. More...
#include <json_schema_validator.h>
Public Member Functions | |
| JSON_SCHEMA_VALIDATOR (const wxFileName &aSchemaFile) | |
| JSON_SCHEMA_VALIDATOR (const nlohmann::json &aSchema) | |
| ~JSON_SCHEMA_VALIDATOR ()=default | |
| nlohmann::json | Validate (const nlohmann::json &aJson, nlohmann::json_schema::error_handler &aErrorHandler, const nlohmann::json_uri &aInitialUri=nlohmann::json_uri("#")) const |
Private Member Functions | |
| void | setRootSchema (const nlohmann::json &aSchema) |
Private Attributes | |
| nlohmann::json_schema::json_validator | m_validator |
Code outside of kicommon must validate through this class rather than instantiating nlohmann::json_schema::json_validator, whose static library objects carry nlohmann::json definitions that collide under MSVC with the ones kicommon.dll exports.
Definition at line 33 of file json_schema_validator.h.
| JSON_SCHEMA_VALIDATOR::JSON_SCHEMA_VALIDATOR | ( | const wxFileName & | aSchemaFile | ) |
Definition at line 28 of file json_schema_validator.cpp.
References _, and setRootSchema().
| JSON_SCHEMA_VALIDATOR::JSON_SCHEMA_VALIDATOR | ( | const nlohmann::json & | aSchema | ) |
Definition at line 53 of file json_schema_validator.cpp.
References _, and setRootSchema().
|
default |
References setRootSchema(), and Validate().
|
private |
Definition at line 66 of file json_schema_validator.cpp.
References dummy, and m_validator.
Referenced by JSON_SCHEMA_VALIDATOR(), JSON_SCHEMA_VALIDATOR(), and ~JSON_SCHEMA_VALIDATOR().
| nlohmann::json JSON_SCHEMA_VALIDATOR::Validate | ( | const nlohmann::json & | aJson, |
| nlohmann::json_schema::error_handler & | aErrorHandler, | ||
| const nlohmann::json_uri & | aInitialUri = nlohmann::json_uri("#") ) const |
Definition at line 78 of file json_schema_validator.cpp.
References m_validator.
Referenced by API_PLUGIN_CONFIG::API_PLUGIN_CONFIG(), PLUGIN_CONTENT_MANAGER::ValidateJson(), and ~JSON_SCHEMA_VALIDATOR().
|
private |
Definition at line 49 of file json_schema_validator.h.
Referenced by setRootSchema(), and Validate().