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

Currency should be JSON serializable #79

Merged
merged 7 commits into from
Sep 23, 2023
Merged

Conversation

joelvh
Copy link
Contributor

@joelvh joelvh commented Aug 24, 2023

We regularly pass the currency along to an API as part of an array and expected Currency to serialize to a JSON string because it's stringable. However, it serializes to an empty array.

v0.7.0 made AbstractMoney JSON serializable, but Currency wasn't treated that way.

This updates Currency to be JSON serializable when using it separately from Money.

@BenMorel
Copy link
Member

Makes sense! Please add a test and I'll merge it 👍

@joelvh
Copy link
Contributor Author

joelvh commented Sep 7, 2023

@BenMorel added a test - let me know if you had others in mind. (Existing Money tests validate the JSON serialization is correct too.)

@BenMorel BenMorel merged commit 833b8ac into brick:master Sep 23, 2023
7 checks passed
@BenMorel
Copy link
Member

Thank you, released as 0.8.1!

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.

None yet

2 participants