Documentation ¶
Overview ¶
Package jsn provides fast and no-allocation functions to extract values and modify JSON data
Index ¶
- func Clear(w *bytes.Buffer, v []byte) error
- func Filter(w *bytes.Buffer, b []byte, keys []string) error
- func Keys(b []byte) [][]byte
- func Replace(w *bytes.Buffer, b []byte, from, to []Field) error
- func Strip(b []byte, path [][]byte) []byte
- func Tree(v []byte) (map[string]json.RawMessage, bool, error)
- func Validate(s string) error
- func ValidateBytes(b []byte) error
- func Value(b []byte) []byte
- type Field
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clear ¶
Clear function wipes all scalar values from the json including those directly in an array
func Filter ¶
Filter function filters the JSON keeping only the provided keys and removing all others
func Replace ¶
Replace function replaces key-value pairs provided in the `from` argument with those in the `to` argument
Types ¶
Click to show internal directories.
Click to hide internal directories.