# Clarify JSON Validator
A powerful and flexible JSON validation library for Rust with multi-language support.
## Features
- ✅ **Multi-language Support**: English (default) and Portuguese
- ✅ **Detailed Error Messages**: Clear and actionable error descriptions
- ✅ **Type-Safe**: Strongly typed error structures
- ✅ **Extensible**: Easy to add new error types and languages
- ✅ **Framework Integration**: Optional Axum support
- ✅ **Zero-Cost Abstractions**: Minimal runtime overhead
## Quick Start
```rust
use clarify::json_validator::*;
fn main() {
// English (default)
let error = MissingFieldError::new("email".to_string());
let result: ValidationResult = error.into();
println!("{}", result.user_message);
// Output: "Incomplete request data"
// Portuguese
let error_pt = MissingFieldError::new_with_lang(
"email".to_string(),
Language::Pt
);
let result_pt: ValidationResult = error_pt.into();
println!("{}", result_pt.user_message);
// Output: "Dados incompletos na requisição"
}
```
## Installation
```toml
[dependencies]
clarify = "0.1.0"
# With Axum integration
clarify = { version = "0.1.0", features = ["axum"] }
```
## Documentation
- **[English Documentation](docs/en/README.md)** - Complete guide in English
- **[Documentação em Português](docs/pt/README.md)** - Guia completo em português
## Examples
See the [examples](examples/) directory for more usage examples.
## Contributing
Contributions are welcome! Please check our [contributing guidelines](CONTRIBUTING.md).
## License
MIT License - see [LICENSE](LICENSE) file for details.
## Author
Luan Costa