Documentation
¶
Index ¶
- func Equal(x, y io.Reader) (bool, error)
- func EqualBytes(x, y []byte) (bool, error)
- func EqualFiles(x, y string) (bool, error)
- func Indent(r io.Reader, prefix, indent string) ([]byte, error)
- func IndentBytes(data []byte, prefix, indent string) ([]byte, error)
- func MarshalFileIndentBytes(name string, data []byte, prefix, indent string, perm fs.FileMode) error
- func ObjectKeys(b []byte) ([]string, error)
- func ObjectKeysFile(filename string) ([]string, error)
- func ObjectModify(b []byte, fieldNamesInclCopy []string, ...) ([]byte, error)
- func PrintIndent(r io.Reader, prefix, indent string) ([]byte, error)
- func Unescape(b []byte, prefix, indent string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualBytes ¶
func EqualFiles ¶
func Indent ¶
Indent returns a byte slice of indented JSON given an `io.Reader`. It is useful to use with `http.Response.Body` which is an `io.ReadCloser`.
func IndentBytes ¶
IndentBytes converts a JSON byte array into a prettified byte array.
func MarshalFileIndentBytes ¶
func ObjectKeys ¶
func ObjectKeysFile ¶
func ObjectModify ¶
func ObjectModify(b []byte, fieldNamesInclCopy []string, fieldNameInclUpsertValues map[string]any) ([]byte, error)
ObjectModify creates a new byte slice, from an existing byte slice, with only the supplied field names.
func PrintIndent ¶
PrintIndent returns an indented JSON byte array given an `io.Reader`.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.