Skip to content

o11n/go-convmap

 
 

Repository files navigation

go-convmap

Build Status PkgGoDev Test Coverage Go Report Card GitHub last commit License

Go library to convert map[interface{}]interface{} to map[string]interface{}.

Background

go-yaml/yaml#139

When we unmarshal YAML to interface{}, the data type of the map will be not map[string]interface{} but map[interface{}]interface{} even if the type of all keys is string. YAML accepts map key whose type isn't string, but JSON doesn't accept map key except for string. And not only JSON but also some languages like Tengo allow only string as map key.

So this library provides the feature to convert map[interface{}]interface{} to map[string]interface{}.

LICENSE

MIT

About

Go library to convert map[interface{}]interface{} to map[string]interface{}

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 71.8%
  • Shell 28.2%