|
pjson 2.0.0
A small, owning JSON value for C++11
|
One schema-compilation or instance-validation failure. More...
#include <pjson_schema.h>
Public Types | |
| enum | Category { InstanceValidation , SchemaCompilation } |
| Distinguishes an instance-validation failure from an invalid or unsupported schema contract discovered while compiling the validator. More... | |
| enum | Code { None , FalseSchema , TypeMismatch , ConstMismatch , EnumMismatch , NumericConstraint , StringConstraint , ArrayConstraint , ObjectConstraint , FormatMismatch , CombinatorMismatch , ReferenceFailure , ReferenceCycle , RegexFailure , UnsupportedKeyword , InvalidSchema , UnsupportedDialect , UnsupportedVocabulary , ResolverFailure , ResourceLimit , AllocationFailure , InternalError } |
Stable machine-readable failure category. keyword identifies the precise keyword when several keywords share a category. More... | |
Public Member Functions | |
| Error (Code aCode, Category aCategory, const std::string &aInstanceLocation, const std::string &aSchemaLocation, const std::string &aKeyword, const std::string &aMessage) | |
| Constructs a fully located diagnostic. | |
Public Attributes | |
| Code | code |
| Stable machine-readable failure category. | |
| Category | category |
| Compilation or instance-validation phase. | |
| std::string | instanceLocation |
| JSON Pointer into the instance; empty is root. | |
| std::string | schemaLocation |
| Pointer or retrieval URI plus fragment for the schema. | |
| std::string | keyword |
| Triggering keyword; empty for whole-schema failures. | |
| std::string | message |
| Human-readable diagnostic, not a stable API token. | |
| std::vector< Error > | causes |
| Optional bounded combinator branch failures. Constructs an empty diagnostic. | |
One schema-compilation or instance-validation failure.
One schema or instance-validation failure.
Provides a stable code, separate instance and schema locations, the triggering keyword, human-readable text, and optional nested combinator causes. category distinguishes compilation from instance validation.
Definition at line 85 of file pjson_schema.h.
Distinguishes an instance-validation failure from an invalid or unsupported schema contract discovered while compiling the validator.
| Enumerator | |
|---|---|
| InstanceValidation | The instance violates a valid schema. |
| SchemaCompilation | The schema contract is invalid or unsupported. |
Definition at line 88 of file pjson_schema.h.
Stable machine-readable failure category. keyword identifies the precise keyword when several keywords share a category.
Definition at line 95 of file pjson_schema.h.
| ByteDance::pJsonSchemaValidator::Error::Error | ( | Code | aCode, |
| Category | aCategory, | ||
| const std::string & | aInstanceLocation, | ||
| const std::string & | aSchemaLocation, | ||
| const std::string & | aKeyword, | ||
| const std::string & | aMessage | ||
| ) |
Constructs a fully located diagnostic.
| Category ByteDance::pJsonSchemaValidator::Error::category |
Compilation or instance-validation phase.
Definition at line 121 of file pjson_schema.h.
| std::vector<Error> ByteDance::pJsonSchemaValidator::Error::causes |
Optional bounded combinator branch failures. Constructs an empty diagnostic.
Definition at line 126 of file pjson_schema.h.
| Code ByteDance::pJsonSchemaValidator::Error::code |
Stable machine-readable failure category.
Definition at line 120 of file pjson_schema.h.
| std::string ByteDance::pJsonSchemaValidator::Error::instanceLocation |
JSON Pointer into the instance; empty is root.
Definition at line 122 of file pjson_schema.h.
| std::string ByteDance::pJsonSchemaValidator::Error::keyword |
Triggering keyword; empty for whole-schema failures.
Definition at line 124 of file pjson_schema.h.
| std::string ByteDance::pJsonSchemaValidator::Error::message |
Human-readable diagnostic, not a stable API token.
Definition at line 125 of file pjson_schema.h.
| std::string ByteDance::pJsonSchemaValidator::Error::schemaLocation |
Pointer or retrieval URI plus fragment for the schema.
Definition at line 123 of file pjson_schema.h.