I have a Table (START_DATE , TEXT ,DECIMAL , INTEGER).
I read the data from the DB and try to de serialize the data.
class Response(Schema):
class Meta:
json_module = simplejson
data = fields.List(fields.List(fields.Raw()))
Response:
"data": [
[
"Tue, 26 Jan 2021 00:00:00 GMT",
"USD",
78790.400000,
79262
],
[
"Mon, 25 Jan 2021 00:00:00 GMT",
"USD",
68852.340000,
77365
]
How can I change the dateformat to '%Y-%m-%dT%H:%M:%S%z'
I did the below change but no change in the date format.
class Response(Schema):
class Meta:
json_module = simplejson
dateformat = '%Y-%m-%dT%H:%M:%S%z'
data = fields.List(fields.List(fields.Raw()))
question from:
https://stackoverflow.com/questions/65922150/deserialize-date-in-marshmallow 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…