Module JSON
source code
JSON
General purpose JSON parser for handling JSON objects matching the following
template. This allows many datapoints for many components to be collected
from a single COMMAND datasource. It also allows for collection of many
events from a single COMMAND datasource.
{
"values": {
"component_id_1": {
"datapoint1": 123.4,
"datapoint2": 987.6
},
"component_id_2": {
"datapoint1": 56.7,
"datapoint2": 54.3
}
},
"events": [
{
"severity": 2,
"other_field_1": "value for other field",
"summary": "event summary"
},
{
"severity": 3,
"other_field_1": "another value for other field",
"summary": "another event summary"
}
]
}
Convert all keys of given dictionary to strings.
During serialization and deserialization between the collector and hub
we need to enforce that dictionary keys are plan, not unicode,
strings.
|