func (r *JSONResponse) Respond() {
	r.context.ResponseWriter.Header().Set(contentTypeHeader, contentTypeApplicationJSON)
	r.context.ResponseWriter.WriteHeader(r.context.status)
	json.NewEncoder(r.context.ResponseWriter).Encode(r.body)
}
Respond sends a JSON response.
package goweb
import (
	"encoding/json"
	"net/http"
)
const (
	contentTypeHeader          = "Content-Type"
	contentTypeApplicationJSON = "application/json; charset=utf-8"
	contentTypeTextPlain       = "text/plain; charset=utf-8"
)
type JSONResponse struct {
	context *Context
	body    interface{}
}
type TextResponse struct {
	context *Context
	body    string
}
type EmptyResponse struct {
	context *Context
}
type NilResponse struct {
}
type RedirectResponse struct {
	context *Context
	url     string
	code    int
}
type Responder interface {
	Respond()
}