Examples
Practical examples demonstrating JSON Schema validation and unmarshaling with the new separated workflow.
Available Examples
Simple validation example showing valid and invalid data handling.
Direct struct validation without JSON marshaling for optimal performance.
Handle different data types (JSON bytes, maps, structs) with type-specific methods.
Validation + unmarshaling workflow with default value application.
Comprehensive error handling patterns and validation failure management.
Multilingual error messages using Chinese (zh-Hans) and English locales.
Running Examples
# Run any example
cd <example-directory>
go run main.go
# Or run from project root
go run examples/<example-name>/main.go