write_json
The write_json processor converts an object in an event into a JSON string. You can customize the processor to choose the source and target field names.
| Option | Description | Example | 
|---|---|---|
| source | Mandatory field that specifies the name of the field in the event containing the message or object to be parsed. | If sourceis set to"message"and the input is{"message": {"key1":"value1", "key2":{"key3":"value3"}}}, then thewrite_jsonprocessor outputs the event as"{\"key1\":\"value1\",\"key2\":{\"key3\":\"value3\"}}". | 
| target | An optional field that specifies the name of the field in which the resulting JSON string should be stored. If targetis not specified, then thesourcefield is used. | key1 |