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

Allow to dynamically skip a field by returning SKIP #92

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

casperisfine
Copy link

Context

I'm trying to convert one of our app that uses AMS 0.9 (Shopify/shipit-engine#1139), but one missing feature the the possibility of skipping an attribute.

I've read #16 and I understand the performance concern, however I think it can be done efficiently.

This PR

It define a special value Panko::Serializer::SKIP, if a serializer field returns it, the field is not serialized. The performance overhead should be totally negligible.

Copy link
Owner

@yosiat yosiat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feature!

@yosiat yosiat merged commit a878438 into yosiat:master Feb 15, 2021
@silva96
Copy link

silva96 commented Apr 24, 2023

It would be great if there exists some kind of documentation or reference of this feature. I discovered it by luck.

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.

4 participants