Documentation
¶
Overview ¶
Package data holds custom types and functions for passing JSON between ratchet stages.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObjectsFromJSON ¶
ObjectsFromJSON is a helper for parsing JSON into a slice of generic maps/objects. The use-case is when a stage is expecting to receive either a JSON object or an array of JSON objects, and want to deal with it in a generic fashion.
func ParseJSONSilent ¶
ParseJSONSilent won't log output when unmarshaling fails. It can be used in cases where failure is expected.
Types ¶
type JSON ¶
type JSON []byte
JSON is the data type that is passed along all data channels. Under the covers, JSON is simply a []byte containing JSON data.
func JSONFromHeaderAndRows ¶
JSONFromHeaderAndRows takes the given header and rows of values, and turns it into a JSON array of objects.