jsonxml

package
v0.0.0-...-a669293 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2014 License: BSD-2-Clause-Views Imports: 7 Imported by: 0

Documentation

Overview

Package jsonxml implements some simple boilerplate for writing JSON/XML data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(r *http.Request, data interface{}) error

func ReadBytes

func ReadBytes(r *http.Request) ([]byte, error)

func ReadMax

func ReadMax(r *http.Request, data interface{}, maxBytes int64) error

func ReadMaxBytes

func ReadMaxBytes(r *http.Request, maxBytes int64) ([]byte, error)

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

func WriteStatus(w http.ResponseWriter, r *http.Request, data interface{}, status int) error

Marshal the given data, based on the requests Accept type, and write it to the response with the status.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL