From 34e94f6576fa97fa5e20e6b2d156d9fb49f4ed11 Mon Sep 17 00:00:00 2001 From: jowj Date: Mon, 27 Jan 2020 16:35:56 -0600 Subject: [PATCH] Move from line by line items to object by object. --- arke.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arke.py b/arke.py index 55c09c6..a819f59 100644 --- a/arke.py +++ b/arke.py @@ -108,8 +108,9 @@ while is_on: # queue up an alert if stateChanged = True results = [] with open("/shared/results.json", "r") as json_File: - for line in json_File: - results.append(json.loads(line)) + json_data = json.load(json_File) + for item in json_data: + results.append(item) for item in results: for key, value in item.items(): if stateChanged is True: