Our great sponsors
-
validator
:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
godantic
godantic is a Go package that provides functionality for decoding JSON data and validating it against a given object structure. It aims to simplify the process of decoding and validating JSON input in Go applications.
-
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.
Go uses zero values to provide sensible default values. It's a design choice. With a quick Google you'll find several libraries such as https://github.com/go-playground/validator or https://github.com/asaskevich/govalidator. I use validator whenever I need to ensure any JSON I unmarshalled is correct.
xeipuuv/gojsonschema
Go uses zero values to provide sensible default values. It's a design choice. With a quick Google you'll find several libraries such as https://github.com/go-playground/validator or https://github.com/asaskevich/govalidator. I use validator whenever I need to ensure any JSON I unmarshalled is correct.
Maybe https://github.com/mitchellh/mapstructure can do what you want? It has some options for Remainder Values and Omit Empty
https://github.com/GraHms/godantic try this out
go-ozzo/ozzo-validation