Sorting keys and removing whitespaces in Appointment.to_json

This commit is contained in:
Salvatore Ingala
2019-10-21 11:07:58 +08:00
parent 7fadde556a
commit e71c014535

View File

@@ -25,4 +25,4 @@ class Appointment:
# ToDO: #3-improve-appointment-structure # ToDO: #3-improve-appointment-structure
def to_json(self): def to_json(self):
return json.dumps(self.to_dict()) return json.dumps(self.to_dict(), sort_keys=True, separators=(',', ':'))