1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! # JSON Structure
//!
//! A Rust implementation of the JSON Structure schema validation library.
//!
//! JSON Structure is a type-oriented schema language for JSON, designed for defining
//! data structures that can be validated and mapped to programming language types.
//!
//! ## Features
//!
//! - **Schema Validation**: Validate JSON Structure schema documents for correctness
//! - **Instance Validation**: Validate JSON instances against JSON Structure schemas
//! - **Source Location Tracking**: Line/column tracking for error messages
//! - **Extension Support**: Support for validation, composition, and other extensions
//!
//! ## Quick Start
//!
//! ```rust
//! use json_structure::{SchemaValidator, InstanceValidator};
//!
//! // Validate a schema
//! let schema_json = r#"{
//! "$id": "https://example.com/person",
//! "name": "Person",
//! "type": "object",
//! "properties": {
//! "name": { "type": "string" },
//! "age": { "type": "int32" }
//! },
//! "required": ["name"]
//! }"#;
//!
//! let schema_validator = SchemaValidator::new();
//! let schema_result = schema_validator.validate(schema_json);
//! assert!(schema_result.is_valid());
//!
//! // Validate an instance
//! let schema: serde_json::Value = serde_json::from_str(schema_json).unwrap();
//! let instance_json = r#"{"name": "Alice", "age": 30}"#;
//!
//! let instance_validator = InstanceValidator::new();
//! let instance_result = instance_validator.validate(instance_json, &schema);
//! assert!(instance_result.is_valid());
//! ```
//!
//! ## Supported Types
//!
//! ### Primitive Types
//! - `string`, `boolean`, `null`
//! - `number`, `integer` (alias for `int32`)
//! - `int8`, `int16`, `int32`, `int64`, `int128`
//! - `uint8`, `uint16`, `uint32`, `uint64`, `uint128`
//! - `float`, `float8`, `double`, `decimal`
//! - `date`, `time`, `datetime`, `duration`
//! - `uuid`, `uri`, `binary`, `jsonpointer`
//!
//! ### Compound Types
//! - `object` - JSON object with typed properties
//! - `array` - Homogeneous list
//! - `set` - Unique homogeneous list
//! - `map` - Dictionary with string keys
//! - `tuple` - Fixed-length typed array
//! - `choice` - Discriminated union
//! - `any` - Any JSON value
//!
//! ## Extensions
//!
//! Extensions can be enabled via the `$uses` keyword in schemas:
//!
//! - `JSONStructureValidation` - Validation constraints (minLength, pattern, etc.)
//! - `JSONStructureConditionalComposition` - Conditional composition (allOf, oneOf, etc.)
//! - `JSONStructureImport` - Schema imports
//! - `JSONStructureAlternateNames` - Alternate property names
//! - `JSONStructureUnits` - Unit annotations
pub use ;
pub use InstanceValidator;
pub use JsonSourceLocator;
pub use SchemaValidator;
pub use ;
// Re-export type constants
pub use ;