I'm trying to handle http requests in my go api, in which i wish to send empty json string like
{"result": {}, "status": "failed"}
but when the mysql query returns zero rows, it return an output as
{"result": null, "status": "failed"}
Edit : This is the response struct i'm using:
type Resp struct {
Result []map[string]interface{} `json:"result"`
Status string `json:"status"`
}
How can i handle this situation?