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)