Python Forum
Json fields not being retrieved
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Json fields not being retrieved
#4
Thank you.
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"
},
(…)
Reply


Messages In This Thread
Json fields not being retrieved - by mrcurious2020 - Sep-14-2020, 12:16 AM
RE: Json fields not being retrieved - by scidam - Sep-14-2020, 12:34 AM
RE: Json fields not being retrieved - by bowlofred - Sep-14-2020, 01:15 AM
RE: Json fields not being retrieved - by mrcurious2020 - Sep-14-2020, 04:36 AM
RE: Json fields not being retrieved - by bowlofred - Sep-14-2020, 06:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sequential number for rows retrieved and storing the Primary UKey to the line number GYKR 2 624 Aug-22-2023, 10:14 AM
Last Post: GYKR
  Compare fields from two csv files georgebijum 3 1,430 Apr-25-2022, 11:16 PM
Last Post: Pedroski55
  how to filter two fields in json using python python_student 4 3,741 Mar-15-2021, 05:58 PM
Last Post: python_student
  Mapping Fields zak308 0 2,518 Jan-09-2018, 10:02 PM
Last Post: zak308

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020