Closed casperisfine closed 3 years ago
I'm trying to convert one of our app that uses AMS 0.9 (https://github.com/Shopify/shipit-engine/pull/1139), but one missing feature the the possibility of skipping an attribute.
I've read https://github.com/panko-serializer/panko_serializer/issues/16 and I understand the performance concern, however I think it can be done efficiently.
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.
Panko::Serializer::SKIP
It would be great if there exists some kind of documentation or reference of this feature. I discovered it by luck.
Context
I'm trying to convert one of our app that uses AMS 0.9 (https://github.com/Shopify/shipit-engine/pull/1139), but one missing feature the the possibility of skipping an attribute.
I've read https://github.com/panko-serializer/panko_serializer/issues/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.