Documentation ¶
Overview ¶
Package jsonutil helps with encoding/decoding data in json format.
Index ¶
- func DecodeJSON(data []byte, out interface{}) error
- func DecodeJSONFromReader(r io.Reader, out interface{}) error
- func EncodeJSON(in interface{}) ([]byte, error)
- func EncodeJSONToWriter(w io.Writer, in interface{}, prefix, indent string) error
- func EncodeJSONWithIndentation(in interface{}) ([]byte, error)
- func EncodeJSONWithoutErr(in interface{}) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONFromReader ¶
DecodeJSONFromReader - Decodes/Unmarshals the given io.Reader pointing to a JSON, into a desired object
func EncodeJSON ¶
EncodeJSON - Encodes/Marshals the given object into JSON
func EncodeJSONToWriter ¶
EncodeJSONToWriter - encodes/marshals a given interface to an io writer. it can also indent the output
func EncodeJSONWithIndentation ¶
EncodeJSONWithIndentation - Encodes/Marshals the given object into JSON DEPRACATED
func EncodeJSONWithoutErr ¶
func EncodeJSONWithoutErr(in interface{}) []byte
EncodeJSONWithoutErr - Encodes/Marshals the given object into JSON but does not return an err
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.