Documentation ¶
Overview ¶
Package json manages applying a program of selectors, processors, and extractors as defined by the jq program against input JSON and producing the result.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shell ¶
Shell makes calls to the jq binary installed in the current environment to implement the Processor interface.
func NewShell ¶
func NewShell(opts ...ShellOption) (*Shell, error)
NewShell returns a new shell Processor with all configurations applied.
func (*Shell) Process ¶
Process runs the input JSON and the processing program through the jq command with both as inputs via stdin. The results or a possible error are returned.
func (*Shell) ToggleCompact ¶
func (sh *Shell) ToggleCompact()
ToggleCompact flips the internal compact option
type ShellOption ¶
ShellOption allows a client to configure the behavior of the underlying jq process
func OptionCompact ¶
func OptionCompact(compact bool) ShellOption
OptionCompact tells jq to return compact output