Skip to content

@to_yojson and @of_yojson attributes to support custom serde impls #107

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
merged 1 commit into from
Oct 8, 2019

Conversation

cemerick
Copy link
Contributor

@cemerick cemerick commented Oct 7, 2019

(Addressing #106.)

This works for me, and tests clean under 4.04 and 4.07.

I think the only set of cases that aren't supported here are variants, the existing implementation of which depends on having a fixed representation in multiple places. It might be good and worthwhile to support these new attrs for individual variants, but it seems reasonable to address that separately?

FYI, this is my first time working with a ppx's implementation, so bear that in mind upon review. 😊

@cemerick
Copy link
Contributor Author

cemerick commented Oct 7, 2019

Forgot to mention: I'll add notes/docs as appropriate prior to merging if what's here is 👍

@whitequark whitequark merged commit 10aabf4 into ocaml-ppx:master Oct 8, 2019
@whitequark
Copy link
Collaborator

I'll add notes/docs as appropriate prior to merging if what's here is

Ah sorry, missed that. Feel free to add docs as a separate PR.

@cemerick
Copy link
Contributor Author

cemerick commented Oct 9, 2019

No worries, will get something in later this morning.

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