Documentation ¶
Overview ¶
Package json provides JSON utilities and wrappers around buger/jsonparser
Index ¶
- Constants
- Variables
- func Addr(dst []byte, src netip.Addr) []byte
- func ArrayEach(src []byte, cb func(key int, val []byte, typ Type) error) (reterr error)
- func Ascii(dst, src []byte) []byte
- func B(str string) []byte
- func Bool(dst []byte, val bool) []byte
- func Byte(dst []byte, src byte) []byte
- func Get(src []byte, path ...string) []byte
- func GetBool(src []byte, path ...string) bool
- func Hex(dst []byte, src []byte) []byte
- func Int(dst []byte, src int) []byte
- func ObjectEach(src []byte, cb func(key string, val []byte, typ Type) error) (reterr error)
- func Prefix(dst []byte, src netip.Prefix) []byte
- func Prefixes(dst []byte, src []netip.Prefix) []byte
- func Q(buf []byte) []byte
- func S(buf []byte) string
- func SQ(buf []byte) string
- func Uint16(dst []byte, src uint16) []byte
- func Uint32(dst []byte, src uint32) []byte
- func UnAddr(src []byte) (netip.Addr, error)
- func UnBool(src []byte) (bool, error)
- func UnByte(src []byte) (byte, error)
- func UnHex(src []byte, dst []byte) ([]byte, error)
- func UnInt(src []byte) (int, error)
- func UnPrefix(src []byte) (netip.Prefix, error)
- func UnPrefixes(src []byte, dst []netip.Prefix) ([]netip.Prefix, error)
- func UnUint16(src []byte) (uint16, error)
- func UnUint32(src []byte) (uint32, error)
- type Type
Constants ¶
Variables ¶
Functions ¶
func ArrayEach ¶
ArrayEach calls cb for each *non-nil* value in the src array. If the callback returns or panics with an error, ArrayEach immediately returns it.
func ObjectEach ¶
ObjectEach calls cb for each non-null value in the src object. If the callback returns or panics with an error, ObjectEach immediately returns it.
Types ¶
Click to show internal directories.
Click to hide internal directories.