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

Add DiscardUnknown to UnmarshalOptions #37

Closed
bufdev opened this issue Jun 27, 2024 · 1 comment
Closed

Add DiscardUnknown to UnmarshalOptions #37

bufdev opened this issue Jun 27, 2024 · 1 comment
Labels
Feature New feature or request

Comments

@bufdev
Copy link
Member

bufdev commented Jun 27, 2024

Similar to:

It would be good to have a DiscardUnknown option on protoyaml.UnmarshalOptions.

bufbuild/buf#2714 is the motivation for this issue.

@Alfus Alfus added the Feature New feature or request label Aug 9, 2024
@Alfus
Copy link
Contributor

Alfus commented Aug 10, 2024

Ideally, protoyaml (and protojson and protobuf) would only ignore fields explicitly marked as 'ignore' instead of all unknown fields. This would allow the safe removal of old fields without risking uncaught typos (similar to how reserved fields ids keep track of old fields to avoid reuse). However, protoyaml should have this option for feature parity with protojson/buf.

Alfus added a commit that referenced this issue Aug 15, 2024
@Alfus Alfus closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants