Skip to content

sassoftware/yj-valid8r

YJ-Valid8r: Validate JSON & YAML with CLI, Web Playground & Go Library

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.

Open Source Love License Made with Go Go Reference Contributions Welcome CLI Supported Web App Supported Library Supported GitHub Action Supported

Web Screenshot CLI Screenshot

Releases

See the Releases page for changelogs and downloadable binaries.

Project Structure

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

Usage

Run 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.

Run Web

cd yj-valid8r/yj-valid8r-web
go run main.go

See the README in the yj-valid8r-web directory for more details.

Use as a Library

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.

Plugin Support

You can extend validations using custom Go plugins.

Enable Plugin Support

Add in your config or pass via flag (--plugins=examples/plugin1.so,examples/plugin2.so):

plugins: |
  examples/plugin1.so
  examples/plugin2.so

Plugin Example Structure

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{}

Build Command

go build -buildmode=plugin -o plugins/sampleplugin.so plugins/sampleplugin/plugin.go

Output Example

{
  "name": "SamplePlugin",
  "messages": ["Message"],
  "warnings": ["Warning"],
  "errors": ["Error"],
  "execution_time": 1234
}

Security

See the SECURITY.md file for details on our security policy and how to report vulnerabilities.

Issues

See the SUPPORT.md file for information on how to open an issue against this repository.

Contributing

Contributions are welcome! Please read our Contributing Guidelines for more information.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Attributions

This project uses the following open source libraries and components:

Contact

For any inquiries or support, please reach out to:

About

A Go-based tool that validates JSON and YAML files against JSON Schema

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published