Writes fields as JSON. The specified fields will be formatted as JSON and
assigned to the field specified in as, defaults to
_json
.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
as | string | false | _json | Name of output field. |
field | string | false | @rawstring | Fields that should be converted to JSON. |
Examples
Multiple fields can be included:
humio
a.b.c=5 a.b.e[0]=6 a.d=7 a.f.g=8
Would be written as { "a": { "b": { "c": 5, "e": [6] }, "d": 7 } } to
the field _json
.
humio
writeJson([a.b, a.d])