Sep-14-2020, 04:36 AM
(This post was last modified: Sep-14-2020, 04:36 AM by mrcurious2020.)
Thank you.
How about the json output below. Can you clarify this below, if possible:
"device-hardware": { <== I see this is a dictionary
"device-alarm": [ <== this would be the key, but there is a list
{
"alarm-category": "alarm-severity-critical",
"alarm-description": "Power Supply Failure",
"alarm-id": 3,
"alarm-instance": 0,
"alarm-name": "Power Supply Module 0",
"alarm-time": "2020-06-30T05:35:18+00:00"
},
(…)
How about the json output below. Can you clarify this below, if possible:
content = json.load(f)['device-hardware'] <== This is not functional for the below{
"device-hardware": { <== I see this is a dictionary
"device-alarm": [ <== this would be the key, but there is a list
{
"alarm-category": "alarm-severity-critical",
"alarm-description": "Power Supply Failure",
"alarm-id": 3,
"alarm-instance": 0,
"alarm-name": "Power Supply Module 0",
"alarm-time": "2020-06-30T05:35:18+00:00"
},
(…)