From 7bdaeb1a1c9f4917ee2cf7b9a02822983e9030bc Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Mon, 27 Jul 2020 11:05:36 -0400 Subject: [PATCH] Stopped using json.dumps() for JSON representations --- api/ECNQueue.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index b83fefa..401c587 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -266,7 +266,7 @@ def toJson(self) -> dict: Returns: dict: JSON safe representation of the item. """ - return json.dumps(self.jsonData) + return self.jsonData def __repr__(self) -> str: return self.queue + str(self.number) @@ -308,6 +308,9 @@ def __getItems(self) -> list: def toJson (self) -> dict: """Return JSON safe representation of the Queue + The JSON representation of every item in the Queue is added to the + Queue's JSON data then the Queue's JSON data is returned. + Returns: dict: JSON safe representation of the Queue """ @@ -316,7 +319,7 @@ def toJson (self) -> dict: items.append(item.toJson()) self.jsonData["items"] = items - return json.dumps(self.jsonData) + return self.jsonData def __len__(self) -> int: return len(self.items)