A modular toolkit for validating JSON & YAML files using custom rules and JSON Schema checks.
It provides independent components — a powerful CLI, an interactive Web Playground, and reusable Go libraries — so you can integrate validation into your pipelines, applications, or developer workflows with ease.
Designed for flexibility, it also supports a plugin system to extend validation logic beyond schemas, enabling deep data quality checks tailored to your needs.
Web Screenshot | CLI Screenshot |
---|---|
![]() |
![]() |
See the Releases page for changelogs and downloadable binaries.
yj-valid8r/
├── yj-valid8r-lib/ # Core parsing & validation logic
├── yj-valid8r-cli/ # Command-line tool
│ └── examples/
│ └── config.yaml # Sample config
├── yj-valid8r-web/ # Web server / API
└── yj-valid8r-common/ # Shared utils used in web and cli
cd yj-valid8r/yj-valid8r-cli
go run main.go --config=examples/config.yaml
See the README in the yj-valid8r-cli
directory for more details.
cd yj-valid8r/yj-valid8r-web
go run main.go
See the README in the yj-valid8r-web
directory for more details.
import validator "github.com/sassoftware/yj-valid8r/yj-valid8r-lib"
result := validator.CheckTabsAndWhitespacesFinder(dataBytes)
See the README in the yj-valid8r-lib
directory for more details.
You can extend validations using custom Go plugins.
Add in your config or pass via flag (--plugins=examples/plugin1.so,examples/plugin2.so
):
plugins: |
examples/plugin1.so
examples/plugin2.so
package main
// SamplePlugin demonstrates a valid plugin structure
type SamplePlugin struct{}
// Name returns the name of the plugin
func (p *SamplePlugin) Name() string {
return "SamplePlugin"
}
// Run processes the data and returns message, warnings, and errors
func (p *SamplePlugin) Run(data []byte) ([]string, []string, []string) {
return []string{"Sample message from plugin"}, []string{"Sample warning"}, []string{"Sample error"}
}
// Required exported symbol
var PluginInstance = &SamplePlugin{}
go build -buildmode=plugin -o plugins/sampleplugin.so plugins/sampleplugin/plugin.go
{
"name": "SamplePlugin",
"messages": ["Message"],
"warnings": ["Warning"],
"errors": ["Error"],
"execution_time": 1234
}
See the SECURITY.md file for details on our security policy and how to report vulnerabilities.
See the SUPPORT.md file for information on how to open an issue against this repository.
Contributions are welcome! Please read our Contributing Guidelines for more information.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
This project uses the following open source libraries and components:
- Go standard library
- gopkg.in/yaml.v3
- gin-gonic/gin
- xeipuuv/gojsonschema
- fatih/color
- js-yaml
- monaco-editor
For any inquiries or support, please reach out to: