jsonschema
go-validator-playground
jsonschema | go-validator-playground | |
---|---|---|
3 | 3 | |
835 | 13 | |
- | - | |
7.1 | 4.5 | |
10 days ago | about 1 year ago | |
Go | Go | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jsonschema
-
Validating dynamic JSON user input
If I were doing it, I would define struct that match the data you expect and update those struct as the project progresses. Also if I were doing it I'd explicitly not allow values with different types for the same key so that would prevent me from having to declare value types as interface{}. If you want a more general purpose validation of arbitrary JSON, you could define a JSON schema and validate it with a library like this.
-
GitHub - santhosh-tekuri/jsonschema now implements draft2020-12
check release notes (license Apache-2.0)
-
github.com/santhosh-tekuri/jsonschema@v4 implements draft 2019-09
Just released v4.0.0 of https://github.com/santhosh-tekuri/jsonschema
go-validator-playground
- Go Validation Playground
-
Show HN: Go Validator Playground
Hello HN!
go-playground/validator¹ is probably the most ubiquitous validation library in Go codebases. As much as it's flexible and neat, it's sometimes a PITA to iterate — I have to setup a whole new Go project² to just test some tags.
Hence, I made a WASM³ driven online playground for the same! You can find it here: https://apps.abhijithota.me/go-validator-playground/
You can find the code and more details on the GitHub repo: https://github.com/abhijit-hota/go-validator-playground
1: https://pkg.go.dev/github.com/go-playground/validator/v10
What are some alternatives?
ozzo-validation - An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
svg-playground - Online playground for svg.py
yavp - Yet Another Validation Package for golang, inspired by https://www.npmjs.com/package/validator
go-playground - Better Go Playground powered by React and Monaco editor
checker - Checker is a Go library for validating user input through checker rules provided in struct tags.
mongoplayground - a simple sandbox to test and share MongoDB queries
CONFLATE - Library providing routines to merge and validate JSON, YAML and/or TOML files
valix - Go package for validating requests
gf - GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
gody - :balloon: A lightweight struct validator for Go
codeowners-validator - The GitHub CODEOWNERS file validator