github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/processors/json.md (about) 1 --- 2 title: json 3 type: processor 4 status: deprecated 5 --- 6 7 <!-- 8 THIS FILE IS AUTOGENERATED! 9 10 To make changes please edit the contents of: 11 lib/processor/json.go 12 --> 13 14 import Tabs from '@theme/Tabs'; 15 import TabItem from '@theme/TabItem'; 16 17 :::warning DEPRECATED 18 This component is deprecated and will be removed in the next major version release. Please consider moving onto [alternative components](#alternatives). 19 ::: 20 21 22 <Tabs defaultValue="common" values={[ 23 { label: 'Common', value: 'common', }, 24 { label: 'Advanced', value: 'advanced', }, 25 ]}> 26 27 <TabItem value="common"> 28 29 ```yaml 30 # Common config fields, showing default values 31 label: "" 32 json: 33 operator: clean 34 path: "" 35 value: "" 36 ``` 37 38 </TabItem> 39 <TabItem value="advanced"> 40 41 ```yaml 42 # All config fields, showing default values 43 label: "" 44 json: 45 operator: clean 46 path: "" 47 value: "" 48 parts: [] 49 ``` 50 51 </TabItem> 52 </Tabs> 53 54 ## Fields 55 56 ### `operator` 57 58 The [operator](#operators) to apply to messages. 59 60 61 Type: `string` 62 Default: `"clean"` 63 Options: `append`, `clean`, `copy`, `delete`, `explode`, `flatten`, `flatten_array`, `fold_number_array`, `fold_string_array`, `move`, `select`, `set`, `split`. 64 65 ### `path` 66 67 A [dot path](/docs/configuration/field_paths) specifying the target within the document to the apply the chosen operator to. 68 69 70 Type: `string` 71 Default: `""` 72 73 ```yaml 74 # Examples 75 76 path: foo.bar 77 78 path: . 79 80 path: some_array.0.id 81 ``` 82 83 ### `value` 84 85 A value to use with the chosen operator (sometimes not applicable). This is a generic field that can be any type. 86 87 88 Type: `string` 89 Default: `""` 90 91 ```yaml 92 # Examples 93 94 value: foo 95 96 value: ${!metadata:kafka_key} 97 98 value: false 99 100 value: 10 101 102 value: 103 key: ${!metadata:kafka_key} 104 topic: ${!metadata:kafka_topic} 105 ``` 106 107 ### `parts` 108 109 An optional array of message indexes of a batch that the processor should apply to. 110 If left empty all messages are processed. This field is only applicable when 111 batching messages [at the input level](/docs/configuration/batching). 112 113 Indexes can be negative, and if so the part will be selected from the end 114 counting backwards starting from -1. 115 116 117 Type: `array` 118 Default: `[]` 119 120 ## Alternatives 121 122 All functionality of this processor has been superseded by the 123 [bloblang](/docs/components/processors/bloblang) processor. 124