[{ status: 200, body: { user: 'Bravis' }]
jsonResp := map[string]string {
"status" : "200",
},
body : map[string]string {
"user" : u.Value,
"hand" : "Right",
},
}
jsonResponse, _ := json.Marshal(jsonResp)
fmt.Fprintf(w, string(jsonResponse))
package main
import (
"fmt"
"encoding/json"
)
func main() {
jsonResp := map[string]interface {}{"status" : "200", "body": map[string]interface {} {"user": "s", "dd": "dd"}}
jsonResponse, _ := json.Marshal(jsonResp)
fmt.Println(string(jsonResponse))
}