Writes fields as JSON. The specified fields will be formatted as JSON and assigned to the field specified in as, defaults to _json.

ParameterTypeRequiredDefaultDescription
asstringfalse_jsonName of output field.
fieldstringfalse@rawstringFields 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])