Documentation ¶
Overview ¶
Package jsonxml implements some simple boilerplate for writing JSON/XML data.
Index ¶
- func Read(r *http.Request, data interface{}) error
- func ReadBytes(r *http.Request) ([]byte, error)
- func ReadMax(r *http.Request, data interface{}, maxBytes int64) error
- func ReadMaxBytes(r *http.Request, maxBytes int64) ([]byte, error)
- func Write(w http.ResponseWriter, r *http.Request, data interface{}) error
- func WriteStatus(w http.ResponseWriter, r *http.Request, data interface{}, status int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(w http.ResponseWriter, r *http.Request, data interface{}) error
Marshal the given data, based on the requests Accept type, and write it to the response.
func WriteStatus ¶
Marshal the given data, based on the requests Accept type, and write it to the response with the status.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.