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

Add Result.to_json() with examples-based tests #101

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

ezheidtmann
Copy link
Contributor

Issue type
  • Feature
Summary

Add Result.to_json(), producing a serializable dictionary which can be used for re-creating the Result later.

Calling code must handle serializing Decimal instances into JSON numbers (not strings!). We use simplejson in tests.

@ezheidtmann
Copy link
Contributor Author

This is motivated by a caching layer I'm working on, where it's helpful to use Overpy types and then serialize to strings.

@ezheidtmann ezheidtmann marked this pull request as ready for review October 21, 2021 23:51
@ezheidtmann ezheidtmann force-pushed the add-json-serialization branch from 664d5bd to 54499fc Compare October 21, 2021 23:52
@ezheidtmann
Copy link
Contributor Author

Pushed a fix for the formatting issues identified by CI. The test failure on Windows appears unrelated to this PR.

@phibos phibos added this to the 0.8 milestone Dec 4, 2023
@phibos phibos merged commit 719d4ce into DinoTools:master Dec 4, 2023
@phibos
Copy link
Member

phibos commented Dec 4, 2023

Thanks for you work. This feature will be in the next release.

@ezheidtmann ezheidtmann deleted the add-json-serialization branch December 4, 2023 18:04
phibos added a commit that referenced this pull request Dec 18, 2023
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.

2 participants