public final class SchemaStage extends Object
SCHEMA (specification Section 14.2), as the reference runner implements it
(conformance/run.py, stage_schema):
canonical-json-v1 (SCHEMA_INVALID_JSON,
SCHEMA_DUPLICATE_KEY, SCHEMA_NON_INTEGER_NUMBER);specVersion of another major.minor is
VERSION_UNSUPPORTED_SPEC_VERSION; a header.registryVersion at or above the supported
range is VERSION_REGISTRY_TOO_NEW;SCHEMA_UNKNOWN_CODE; any other schema error is SCHEMA_VIOLATION;SCHEMA_VIOLATION; a SET holding
equal elements or a SEQUENCE with broken ordinals (SEMANTIC_ARRAY_KIND_VIOLATION) is deferred
to stage SEMANTIC;SCHEMA_NOT_CANONICAL.| Modifier and Type | Class and Description |
|---|---|
static class |
SchemaStage.Result
The outcome of the stage.
|
| Constructor and Description |
|---|
SchemaStage(SchemaValidator validator,
CoreRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
Finding |
classify(List<SchemaValidator.SchemaError> errors)
The finding the stage reports for schema errors:
SCHEMA_UNKNOWN_CODE when an enum naming a
registry group rejects a string the group lacks (anywhere in the error tree), else SCHEMA_VIOLATION. |
SchemaStage.Result |
run(byte[] data) |
static SchemaStage |
standard()
The stage with the shipped schema and registry.
|
public SchemaStage(SchemaValidator validator, CoreRegistry registry)
public static SchemaStage standard()
public SchemaStage.Result run(byte[] data)
public Finding classify(List<SchemaValidator.SchemaError> errors)
SCHEMA_UNKNOWN_CODE when an enum naming a
registry group rejects a string the group lacks (anywhere in the error tree), else SCHEMA_VIOLATION.