Registry / serialization / mitchellh-mapstructure

mitchellh-mapstructure

JSON →
library1.5.0gogounverified

Package mapstructure exposes functionality to convert one arbitrary Go type into another, typically to convert a map[string]interface{} into a native Go structure.

go get github.com/mitchellh/mapstructure
INSTALL
IMPORT
SIG · MITCHELLH-MAPSTRUC
M
mitchellh-mapstructure
serializationgov1.5.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.

mapstructure
github.com/mitchellh/mapstructure

Decode a map into a struct

package main import ( "fmt" "github.com/mitchellh/mapstructure" ) type Person struct { Name string Age int } func main() { input := map[string]interface{}{"name": "Alice", "age": 30} var p Person mapstructure.Decode(input, &p) fmt.Printf("%+v\n", p) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mitchellh-mapstructure — go get mitchellh-mapstructure · libregistry