Configuring the parser with a different JsonMessageDepth
Changing the value set for the JsonMessageDepth property changes the tokens that the parser generates.
The table that follows the example JSON data below illustrates how changing the JsonMessageDepth property in the message_bus.props file determines which key-value pairs the parser generates.
{
"properties": {
"storage": {
"type": "object",
"oneOf": [
{"$ref": "#/definitions/diskDevice"},
{"$ref": "#/definitions/diskUUID"},
{"$ref": "#/definitions/nfs"},
{"$ref": "#/definitions/tmpfs"}
]
},
"fstype": {
"enum": ["ext3", "ext4", "btrfs"]
},
"options": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"uniqueItems": true
}
}
}
JSON parser properties | Tokens generated |
---|---|
|
None. There is no field or key-value pair in the first level. |
|
|
|
Note: Array values such as the
enum object
are treated as fields or key-value pairs at the same level as the
node. With this configuration, the oneOf array of
objects is not generated because it is one level deeper. |
|
Note: With this configuration, the
oneOf array
of objects is generated. |
Note: The
resync_event
token is not
part of the JSON message, but is generated by the probe for internal
use.