Documentation
¶
Index ¶
- Variables
- func ToJson(i interface{}) (interface{}, error)
- func WriteJson(w http.ResponseWriter, obj interface{}, code int) error
- func WriteToJson(w http.ResponseWriter, obj interface{}) error
- func WriteToJsonNotWrapped(w http.ResponseWriter, obj interface{}) error
- func WriteToJsonNotWrappedWithCode(w http.ResponseWriter, obj interface{}, code int) error
- func WriteToJsonWithCode(w http.ResponseWriter, obj interface{}, code int) error
- type JsonWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool = false
View Source
var Logger *logrus.Logger
View Source
var ReflectTypeError = errors.New("Got passed reflect.Type")
View Source
var ReflectValueError = errors.New("Got passed reflect.Value")
View Source
var TypeError = errors.New("Could not get type")
View Source
var UnsupportedDatatype = errors.New("Unsupported Datatype")
Functions ¶
func WriteToJson ¶
func WriteToJson(w http.ResponseWriter, obj interface{}) error
func WriteToJsonNotWrapped ¶
func WriteToJsonNotWrapped(w http.ResponseWriter, obj interface{}) error
func WriteToJsonNotWrappedWithCode ¶
func WriteToJsonNotWrappedWithCode(w http.ResponseWriter, obj interface{}, code int) error
func WriteToJsonWithCode ¶
func WriteToJsonWithCode(w http.ResponseWriter, obj interface{}, code int) error
Types ¶
type JsonWriter ¶
type JsonWriter jsonWriter
Click to show internal directories.
Click to hide internal directories.