wip
This commit is contained in:
11
api.saladeaula.digital/app/json_encoder.py
Normal file
11
api.saladeaula.digital/app/json_encoder.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from datetime import date
|
||||
|
||||
from aws_lambda_powertools.shared.json_encoder import Encoder
|
||||
|
||||
|
||||
class JSONEncoder(Encoder):
|
||||
def default(self, obj):
|
||||
if isinstance(obj, date):
|
||||
return obj.isoformat()
|
||||
|
||||
return super().default(obj)
|
||||
Reference in New Issue
Block a user