Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flatten ¶
func Flatten(p *turbine.Payload) error
Flatten takes a potentially nested JSON payload and returns a flattened representation, using a "." as a delimiter. e.g. {"user": {"id":16, "name": "alice"}} becomes {"user.id":16,"user.name":"alice"} If an array of nested objects is encountered, the index of the element will be appended to the field name. e.g. {"user.location.1":"London, UK", "user.location.2":"San Francisco, USA"}
func FlattenSub ¶
FlattenSub takes a potentially nested JSON payload and a path (in dot notation e.g. "foo.bar") and returns a JSON object with only the nested structure at the path specified flattened.
func FlattenSubWithDelimiter ¶
FlattenSubWithDelimiter is a variant of FlattenSub that supports a custom delimiter.
func FlattenWithDelimiter ¶
FlattenWithDelimiter is a variant of Flatten that supports a custom delimiter.
Types ¶
This section is empty.