Layered JSON Schema Validation for Manageable Constraint Reuse
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The complexity and maintenance challenges of single, static JSON schemas for validating JSON objects lead to inefficient and labor-intensive schema management.
Innovation Solution
Implementing multilayer schemas that allow JSON schemas to reference one or more subschemas, enabling smaller and more readable schemas that can be reused and interchanged.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a single static JSON schema is used to validate JSON objects, then validation can be performed, but the schema size and complexity grow quickly making maintenance challenging
Solution Approach 1:
The patent divides the JSON schema into multiple layers, where each layer contains specific constraints or rules. The top layer defines general validation rules, while subsequent layers contain more specific constraints. This segmentation allows the schema to be more manageable and easier to maintain while still providing comprehensive validation coverage.
Solution Approach 2:
The patent implements a nested schema structure where schemas can reference other schemas (subschemas). This allows complex validation rules to be organized in a hierarchical manner, with parent schemas containing child schemas that provide more detailed constraints. The nesting approach reduces overall schema complexity by allowing reuse of common validation patterns across different layers.
2Reliability
If a single static JSON schema is used to validate JSON objects, then validation can be performed, but the task of maintaining and utilizing the schemas becomes more challenging
Solution Approach 1:
By segmenting the schema into multiple layers with distinct validation responsibilities, the patent makes maintenance easier. Each layer can be independently updated or modified without affecting the entire schema, reducing the risk of introducing errors during maintenance operations.
Solution Approach 2:
The patent introduces dynamic schema loading where the validator can selectively load different layers or subschemas based on the specific validation needs. This dynamic approach allows the system to adapt to changing validation requirements without requiring complete schema rewrites, facilitating easier maintenance and evolution.
3Reliability
If a single static JSON schema is used to validate JSON objects, then validation can be performed, but the schema size grows quickly
Solution Approach 1:
The nested schema structure allows the system to organize validation rules in a hierarchical manner where common validation patterns are defined at higher levels and referenced by multiple lower-level schemas. This reduces the total schema size by eliminating redundancy and allowing compact representation of validation rules across different domains.
Solution Approach 2:
The patent implements universal validation patterns that can be applied across multiple JSON object types through the layered schema structure. Common validation rules are defined once at a general level and then reused for different specific validation scenarios, reducing the overall schema size while maintaining comprehensive validation coverage.
Data Source
AI summary
A data processing system implements obtaining a string representing a JSON object at a JSON validator; obtaining a JSON schema for validating the JSON object using the JSON validator, the JSON schema specifying one or more first constraints on the data of the JSON object must be satisfied in order for the JSON object to be valid against the JSON schema; determining, using the JSON validator, that the JSON schema references one or more JSON subschemas, the one or more JSON subschemas specifying one or more second constraints on the data of the JSON object must be satisfied in order for the JSON object to be valid; validating the JSON object using the JSON schema and the one or more JSON subschemas; and performing one or more actions using the JSON object in response to validating the JSON object.


