json

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendBool

func AppendBool(dst []byte, val bool) []byte

func AppendBools

func AppendBools(dst []byte, vals []bool) []byte

func AppendBytes

func AppendBytes(dst, s []byte) []byte

AppendBytes is a mirror of appendString with []byte arg

func AppendDuration

func AppendDuration(dst []byte, d time.Duration, unit time.Duration, useInt bool) []byte

func AppendDurations

func AppendDurations(dst []byte, vals []time.Duration, unit time.Duration, useInt bool) []byte

func AppendError

func AppendError(dst []byte, err error) []byte

func AppendErrors

func AppendErrors(dst []byte, errs []error) []byte

func AppendFloat

func AppendFloat(dst []byte, val float64, bitSize int) []byte

func AppendFloat32

func AppendFloat32(dst []byte, val float32) []byte

func AppendFloat64

func AppendFloat64(dst []byte, val float64) []byte

func AppendFloats32

func AppendFloats32(dst []byte, vals []float32) []byte

func AppendFloats64

func AppendFloats64(dst []byte, vals []float64) []byte

func AppendInt

func AppendInt(dst []byte, val int) []byte

func AppendInt16

func AppendInt16(dst []byte, val int16) []byte

func AppendInt32

func AppendInt32(dst []byte, val int32) []byte

func AppendInt64

func AppendInt64(dst []byte, val int64) []byte

func AppendInt8

func AppendInt8(dst []byte, val int8) []byte

func AppendInterface

func AppendInterface(dst []byte, i interface{}) []byte

func AppendInts

func AppendInts(dst []byte, vals []int) []byte

func AppendInts16

func AppendInts16(dst []byte, vals []int16) []byte

func AppendInts32

func AppendInts32(dst []byte, vals []int32) []byte

func AppendInts64

func AppendInts64(dst []byte, vals []int64) []byte

func AppendInts8

func AppendInts8(dst []byte, vals []int8) []byte

func AppendKey

func AppendKey(dst []byte, key string) []byte

func AppendString

func AppendString(dst []byte, s string) []byte

AppendString encodes the input string to json and appends the encoded string to the input byte slice.

The operation loops though each byte in the string looking for characters that need json or utf8 encoding. If the string does not need encoding, then the string is appended in it's entirety to the byte slice. If we encounter a byte that does need encoding, switch up the operation and perform a byte-by-byte read-encode-append.

func AppendStrings

func AppendStrings(dst []byte, vals []string) []byte

func AppendTime

func AppendTime(dst []byte, t time.Time, format string) []byte

func AppendTimes

func AppendTimes(dst []byte, vals []time.Time, format string) []byte

func AppendUint

func AppendUint(dst []byte, val uint) []byte

func AppendUint16

func AppendUint16(dst []byte, val uint16) []byte

func AppendUint32

func AppendUint32(dst []byte, val uint32) []byte

func AppendUint64

func AppendUint64(dst []byte, val uint64) []byte

func AppendUint8

func AppendUint8(dst []byte, val uint8) []byte

func AppendUints

func AppendUints(dst []byte, vals []uint) []byte

func AppendUints16

func AppendUints16(dst []byte, vals []uint16) []byte

func AppendUints32

func AppendUints32(dst []byte, vals []uint32) []byte

func AppendUints64

func AppendUints64(dst []byte, vals []uint64) []byte

func AppendUints8

func AppendUints8(dst []byte, vals []uint8) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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