Documentation
¶
Overview ¶
Package jsonstream copies JSON objects from a reader to a writer one member at a time, so a document can be filtered without holding it in memory. Values that are kept are written with their original bytes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotObject = errors.New("JSON value is not an object")
ErrNotObject is returned when a value expected to be an object is not.
Functions ¶
func CopyObject ¶
CopyObject copies the object read from dec to w, calling fn for each member. fn decides what is written by how it consumes the member's value; a member whose value fn leaves unconsumed is copied unchanged.
Types ¶
type Member ¶
type Member struct {
Key string
// contains filtered or unexported fields
}
Member is one member of an object being copied. Its value must be consumed exactly once, with Raw, Copy or Object.
func (*Member) Object ¶
Object writes the member and copies its value, which must be an object, calling fn for each of its members. A null value is written as null.