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 handling of datetimes #37

Merged
merged 1 commit into from
Nov 12, 2020
Merged

Fix handling of datetimes #37

merged 1 commit into from
Nov 12, 2020

Conversation

simleo
Copy link
Collaborator

@simleo simleo commented Nov 12, 2020

Fixes #36

  • On-the-fly conversion between strings and datetimes is now performed only when accessing the datePublished property of an entity. This allows the Python user to get and set it as a datetime object if desired, but now without causing problems with serialization
  • The above conversion now also works for Python < 3.7
  • datePublished is now always written as ISO 8601
  • The data structure returned by crate.metadata.generate() is now JSON-serializable out-of-the box

Se the issue for more details

@simleo simleo merged commit 8b98d35 into master Nov 12, 2020
@simleo simleo deleted the fix_datePublished branch November 12, 2020 12:03
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.

Ensure Entity.properties yields ready-to-write JSON
1 participant