↧
Answer by Cerise Limón for Cannot convert string map to json
The variable jmap is type []byte. The call to JSON encoder in c.JSON() marshals []byte as a base64 encoded string as you see in the output. To fix the problem, use one level of JSON encoding by passing...
View ArticleCannot convert string map to json
I'd like to make a json out of a hash received from redis using redigo: func showHashtags(c *gin.Context) { hashMap, err := redis.StringMap(conn.Do("HGETALL", MyDict)) if err != nil { fmt.Println(err)...
View Article