Skip to main content
Version: v4.24

write_json

Transforms the input event stream to JSON byte stream.

write_json [color=bool]

Description

Transforms the input event stream to JSON byte stream.

Newline-Delimited JSON

You can use the write_ndjson operator to write Newline-Delimited JSON.

color = bool (optional)

Colorize the output.

Examples

Convert a YAML stream into a JSON file

load_file "input.yaml"
read_yaml
write_json
save_file "output.json"