1 repositorio
Utilities for converting typed structures back into flexible, untyped map representations.
Distinguishing note: Existing candidates focus on generics as a language feature or specific mapping systems, not struct-to-map conversion.
Explore 1 awesome GitHub repository matching data & databases · Generic Map Transformations. Refine with filters or upvote what's useful.
mapstructure is a reflection-based library for the bidirectional encoding and decoding of generic map data into native typed Go structures. It functions as a tool for transforming loosely typed map values into specific structs and encoding those structs back into maps. The library utilizes Go reflection to map generic data keys to struct fields during runtime. It supports the transformation of untyped data from dynamic sources or configuration files into type-safe native structures. The mapping process includes recursive traversal of nested maps and slices, as well as the use of struct tags
Converts typed Go structures back into generic maps for flexible data transmission or storage in non-typed systems.