Registry / serialization / liip-sheriff

liip-sheriff

JSON →
library0.12.0gogounverified

Transforms structs into a map based on tags for API versioning and grouping.

go get github.com/liip/sheriff
INSTALL
IMPORT
SIG · LIIP-SHERIFF
L
liip-sheriff
serializationgov0.12.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.

sheriff
github.com/liip/sheriff

Marshal a struct to a map using sheriff tags.

package main import ( "fmt" "github.com/liip/sheriff" ) func main() { type User struct { Name string `json:"name" groups:"api"` } user := User{Name: "John"} result, _ := sheriff.Marshal(&user, &sheriff.Options{Groups: []string{"api"}}) fmt.Println(result) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
liip-sheriff — go get liip-sheriff · libregistry