[ad_1]
Solution (w is the responseWriter)
str := "{\"key1\":{\"key2\":\"value1\",\"key3\":\"value2\"}}"
w.Write([]byte(str))
2
[ad_2]
solved Encode arbitrary string to JSON in http response
[ad_1]
Solution (w is the responseWriter)
str := "{\"key1\":{\"key2\":\"value1\",\"key3\":\"value2\"}}"
w.Write([]byte(str))
2
[ad_2]
solved Encode arbitrary string to JSON in http response