jsonutil

package
v0.0.0-...-b9f6a0d Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package jsonutil helps with encoding/decoding data in json format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJSON

func DecodeJSON(data []byte, out interface{}) error

DecodeJSON ...

func DecodeJSONFromReader

func DecodeJSONFromReader(r io.Reader, out interface{}) error

DecodeJSONFromReader - Decodes/Unmarshals the given io.Reader pointing to a JSON, into a desired object

func EncodeJSON

func EncodeJSON(in interface{}) ([]byte, error)

EncodeJSON ...

func EncodeJSONToWriter

func EncodeJSONToWriter(w io.Writer, in interface{}, prefix, indent string) error

EncodeJSONToWriter - encodes/marshals a given interface to an io writer. it can also indent the output

func EncodeJSONWithIndentation

func EncodeJSONWithIndentation(in interface{}) ([]byte, error)

DEPRACATED

func EncodeJSONWithoutErr

func EncodeJSONWithoutErr(in interface{}) []byte

EncodeJSONWithoutErr ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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