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

113 Add Permissive Serializer. #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

113 Add Permissive Serializer. #114

wants to merge 1 commit into from

Conversation

daym
Copy link
Collaborator

@daym daym commented Nov 27, 2023

Right now, the serializer fails on the first invalid field value it finds.

This isn't nice for bringup of new generations where we usually have (a few) unknown values on some fields and then the entire serializion will fail--and what do we do then?

Better to have the serializer just warn on fields that have unknown values and then leave those fields off the json output.

Since serde already supports skip_serializing_if, let's just skip on error. Users then can override *Serializer's skip_field and figure out when skipping happened and infer that that was because of an error.

@daym
Copy link
Collaborator Author

daym commented Nov 27, 2023

@daym daym force-pushed the issue-113 branch 6 times, most recently from 25f15cf to 53abcb5 Compare November 27, 2023 23:08
@daym daym requested a review from wesolows November 27, 2023 23:10
@daym daym force-pushed the issue-113 branch 7 times, most recently from 74efaeb to 45753d3 Compare November 28, 2023 00:18
@daym daym requested a review from luqmana November 29, 2023 17:44
Copy link
Contributor

@dancrossnyc dancrossnyc left a comment

Choose a reason for hiding this comment

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

Looks like there are some lints that need to be addressed.

@wesolows wesolows removed their request for review March 12, 2024 20:28
@wesolows
Copy link

I'm not an effective reviewer for serde black magic, sorry. Your other requested reviewers are highly capable so please don't wait on me to complete this work and get it tested and integrated.

@dancrossnyc
Copy link
Contributor

My earlier comment (about lint warnings) stands; probably best to rebase this and fix those up and then it will be ready for review.

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.

3 participants