Skip to content

Add EncodeJson/DecodeJson instances for records #46

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

Merged

Conversation

elliotdavies
Copy link
Contributor

What does this pull request do?

Addresses #37 by allowing users to call encodeJson and decodeJson for record types. The relevant classes are implemented using RowToList.

How should this be manually tested?

We've been using this branch in production at Habito for a little while and we're happy it works! I've also added some basic quickcheck tests to test the encode/decode roundtrip but I can expand on these if you'd like.

Other Notes:

I changed Decode.Class to export everything, same as Encode.Class. If you prefer I can change Encode.Class to be more restrictive instead.

@thomashoneyman
Copy link
Contributor

This looks good to me. Unless there are objections (@garyb) I'll merge this tomorrow.

@thomashoneyman thomashoneyman merged commit 4c16dc5 into purescript-contrib:master Nov 9, 2018
@garyb
Copy link
Member

garyb commented Nov 9, 2018

I'm late on this, but no objections from me 😁 - I spoke to @elliotdavies a little while ago about this on Slack, thanks for working on it!

@thomashoneyman thomashoneyman self-assigned this Nov 9, 2018
@elliotdavies elliotdavies deleted the feature/record-codecs branch November 10, 2018 12:34
@elliotdavies
Copy link
Contributor Author

Happy to help! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants