MCPcopy Index your code
hub / github.com/ChimeraCoder/gojson / convertKeysToStrings

Function convertKeysToStrings

json-to-struct.go:256–264  ·  view source on GitHub ↗
(obj map[interface{}]interface{})

Source from the content-addressed store, hash-verified

254}
255
256func convertKeysToStrings(obj map[interface{}]interface{}) map[string]interface{} {
257 res := make(map[string]interface{})
258
259 for k, v := range obj {
260 res[fmt.Sprintf("%v", k)] = v
261 }
262
263 return res
264}
265
266// Generate go struct entries for a map[string]interface{} structure
267func generateTypes(obj map[string]interface{}, structName string, tags []string, depth int, subStructMap map[string]string, convertFloats bool) string {

Callers 3

GenerateFunction · 0.85
generateTypesFunction · 0.85
typeForValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected