mitchellh/mapstructure
Go library for decoding generic map values into native Go structures and vice versa. observed · 2026-08-28
Health v2 · maintenance only
10/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases archived
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4853
- days_rel: n/a
- days_push: 799
- n_releases_24m: 0
Adoption not part of the score
8025 stars · 732 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
mapstructure is a Go library for decoding generic map values (e.g. map[string]interface{}) into native Go structs and vice versa, with helpful error handling. It is commonly used to decode dynamic data from JSON, Gob, or configuration sources where the exact structure isn't known until runtime.
Use cases
- decode json into go structs dynamically
- convert map[string]interface{} to struct in go
- decode configuration files into typed structs
- handle polymorphic json payloads based on a type field
- marshal go structs back into generic maps
- weakly typed field conversion when decoding data
When to choose
- you need to decode dynamic or schema-less data into Go structs
- you must inspect part of a payload (like a type field) before choosing a target struct
- you want lenient decoding with custom hooks, tags, and error accumulation
When to avoid
- you need active maintenance or new features - the repository is archived and no longer accepts issues or releases
- your data has a fixed, known schema - standard encoding/json unmarshaling is simpler
- you need high-performance serialization - reflection-based decoding adds overhead
Facets
library · maturity abandoned
serialization parser configuration-management developer-tools apis backend go cross-platform go-library map-decoding struct-decoding archived
2 sources
- readme: https://github.com/mitchellh/mapstructure · fetched 2026-08-28 · 0b5e51cb685c
- homepage: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc · fetched 2026-08-29 · 45ba7fc863a7
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mitchellh/mapstructure | main | 10 |
For agents
markdown · JSON · MCP: product_card(name="mitchellh/mapstructure")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem