Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToJSONCompatible ¶
func ConvertToJSONCompatible(v interface{}) interface{}
ConvertToJSONCompatible walks the given dynamic object recursively, and converts maps with interface{} key type to maps with string key type. This function comes handy if you want to marshal a dynamic object into JSON where maps with interface{} key type are not allowed.
Recursion is implemented into values of the following types:
-map[interface{}]interface{} -map[string]interface{} -[]interface{}
When converting map[interface{}]interface{} to map[string]interface{}, fmt.Sprint() with default formatting is used to convert the key to a string key.
Credit: https://github.com/icza/dyno
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.