Aggiunto modulo per la conversione degli oggetti in JSON

This commit is contained in:
Fabio Scotto di Santolo
2021-06-24 20:59:13 +02:00
parent a3e5229bfa
commit b53629ae6e
5 changed files with 15 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ class Location:
def country_id(self) -> int:
return self.__country_id
def to_json(self):
def __json__(self):
return {
'location_id': self.__location_id,
'street_address': self.__street_address,