Canon provides canonicalization, pretty-printing, and semantic comparison for XML, HTML, JSON, and YAML formats.
1. Welcome
Canon helps you:
-
Format documents into canonical or human-readable forms
-
Compare documents semantically, not just textually
-
Test with RSpec matchers that understand structure
-
Debug with clear, color-coded diff output
2. Quick Navigation
2.1. By Your Role
- Developer
-
Start with Ruby API to integrate Canon into your applications.
- QA Engineer
-
Start with RSpec Matchers for testing XML/JSON/YAML generation.
- DevOps
-
Start with CLI for command-line formatting and comparison.
- Architect
-
Start with Architecture to understand Canon’s design.
3. Learning Path
3.4. Level 4: Master Features (1 hour)
-
Configuration profiles - YAML-based presets with element-level whitespace control
4. Popular Topics
-
Options Across Interfaces - Same options in CLI, Ruby API, and RSpec
-
Environment Variables - Configure Canon via ENV variables
-
Configuration Profiles - YAML presets with element-level whitespace control
-
Match Profiles - Pre-configured comparison strategies
-
Color-Coded Diffs - Understanding diff output
-
Size Limits - Preventing hangs on large files
-
CLI Options Reference - Complete option listing
5. Getting Help
- Found a bug?
- Have a question?
-
Check Glossary or search this documentation
- Want to contribute?
6. What’s New
6.1. Version 0.x (Current)
-
Semantic tree diff algorithm (experimental)
-
Size limits for large files
-
Enhanced character visualization
-
Environment variable configuration
-
Configuration profiles with element-level whitespace classification
-
Three-way whitespace sensitivity: strict, normalize, insensitive
See Full Changelog