Skip to content

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
@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.

2 participants