go-convmap

module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2024 License: MIT

README

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

https://github.com/go-yaml/yaml/issues/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

Directories

Path Synopsis
Package convmap converts `map[interface{}]interface{}` to `map[string]interface{}`.
Package convmap converts `map[interface{}]interface{}` to `map[string]interface{}`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL