streamer

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 8 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamJSON

func StreamJSON(decoder *json.Decoder, search []SearchElement) (bool, error)

StreamJSON searches the JSON stream for arrays matching a search element. For each array that it finds, it streams them one element at a time.

func StreamJSONArray

func StreamJSONArray(decoder *json.Decoder, path string, cb func(*json.Decoder) error) (bool, error)

StreamJSONArray searches the JSON stream for an array matching 'path'. For each element of this array, it streams one element at a time.

Types

type SearchElement

type SearchElement struct {
	Path string
	CB   func(*json.Decoder) error
}

SearchElement defines the JSON arrays for which to search

Jump to

Keyboard shortcuts

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