-
Notifications
You must be signed in to change notification settings - Fork 54
feat: add ignore_unknown_enum_variants #147
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
base: main
Are you sure you want to change the base?
Conversation
|
@crepererum anything more needed for this eventually get merged? |
|
Sorry, I wasn't paying attention. Code looks good, could we extend CI to also test this feature here: Lines 123 to 145 in d067f2e
|
Done |
|
@crepererum can you approve workflow and see if this is good? |
feat: add ignore_unknown_enum_variants feature Enabling this feature adjust deserialization to ignore unknown enum variants rather than Err out. This permits similar behavior to binary protobuf deserialization and greater backwards/forward compat. of the serialized messages.
f9e4bf5 to
2d7cf0e
Compare
|
@crepererum , rewrote commits to match sematic conventions (I think). So it'd need another run. |
|
Can you rebase against |
This adds an option to ignore unknown enum variants on deserialization. This allows for better forward compatibility, as decoding JSON with newer enum values no longer fails, but instead defaults the enum values (typically set to UNSPECIFIED/UNKNOWN).
Add a test feature and tests specifically around this feature.
The related issue: #92