I need get json string
{"Error": null }
I can do this using this approach
type OKResponse struct {
Error *int `json:"Error"`
}
encoded, err := json.Marshal(OKResponse{})
...
How I can get the same result using map? Or it is not possible?
For example something like this
jsonbody := map[string]int{"Error": nil}
encoded, err := json.Marshal(&jsonbody)
...