Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix datetime is not JSON serializable error #591

Merged
merged 1 commit into from
May 14, 2018

Conversation

aarongorka
Copy link
Contributor

TypeError: datetime.date(2012, 10, 17) is not JSON serializable

This fixes the above exception raised by json.dumps when the yaml
library loads an unquoted date value e.g. 2012-10-17 as a
datetime.time object.

`TypeError: datetime.date(2012, 10, 17) is not JSON serializable`

This fixes the above exception raised by json.dumps when the yaml
library loads an unquoted date value e.g. `2012-10-17` as a
`datetime.time` object.
@phobologic
Copy link
Member

This seems like a fine idea - I can't think of any cases where it would cause any unexpected issues. @ejholmes any thoughts?

@phobologic
Copy link
Member

BTW, thanks @aarongorka !

Copy link
Contributor

@ejholmes ejholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

@phobologic phobologic merged commit d3f3709 into cloudtools:master May 14, 2018
@phobologic
Copy link
Member

Thanks @aarongorka !

phrohdoh pushed a commit to phrohdoh/stacker that referenced this pull request Dec 18, 2018
`TypeError: datetime.date(2012, 10, 17) is not JSON serializable`

This fixes the above exception raised by json.dumps when the yaml
library loads an unquoted date value e.g. `2012-10-17` as a
`datetime.time` object.
aarongorka added a commit to aarongorka/stacker that referenced this pull request Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants