Registry / serialization / jgroeneveld-schema

jgroeneveld-schema

JSON →
library1.0.0gogounverified

A Go library for validating and coercing data structures against a schema definition.

go get github.com/jgroeneveld/schema
INSTALL
IMPORT
SIG · JGROENEVELD-SCHEMA
J
jgroeneveld-schema
serializationgov1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

schema
github.com/jgroeneveld/schema

Define a schema and validate a map against it.

package main import ( "fmt" "github.com/jgroeneveld/schema" ) func main() { s := schema.Object{ "name": schema.String{}, "age": schema.Integer{}, } data := map[string]interface{}{"name": "Alice", "age": 30} err := s.Validate(data) fmt.Println(err) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jgroeneveld-schema — go get jgroeneveld-schema · libregistry