writeJson() Query Function

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

Parameters

Name

Type

Required

Default

Description

field

string

No

@rawstring

Fields that should be converted to JSON.

as

string

No

_json

Name of output field.

The implied parameter is field.

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])