mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 06:34:19 +01:00
Changed to_json to to_dict in Appointment and Job; added to_json to Appointment to actually return a string
This commit is contained in:
@@ -15,7 +15,7 @@ class Appointment:
|
||||
self.cipher = cipher
|
||||
self.hash_function = hash_function
|
||||
|
||||
def to_json(self):
|
||||
def to_dict(self):
|
||||
appointment = {"locator": self.locator, "start_time": self.start_time, "end_time": self.end_time,
|
||||
"dispute_delta": self.dispute_delta, "encrypted_blob": self.encrypted_blob.data,
|
||||
"cipher": self.cipher, "hash_function": self.hash_function}
|
||||
@@ -24,5 +24,5 @@ class Appointment:
|
||||
|
||||
# ToDO: #3-improve-appointment-structure
|
||||
|
||||
def serialize(self):
|
||||
return json.dumps(self.to_json())
|
||||
def to_json(self):
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
Reference in New Issue
Block a user