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 a to specify fields which should not be serialized #407

Closed
saolof opened this issue May 16, 2023 · 2 comments
Closed

Add a to specify fields which should not be serialized #407

saolof opened this issue May 16, 2023 · 2 comments

Comments

@saolof
Copy link

saolof commented May 16, 2023

Description

It would be nice to specify fields which msgspec should not include when serializing, such as private fields/caches in python or passwords. Pydantic lets you specify this using exclude.

@saolof saolof changed the title Add ways to specify fields which should not be serialized Add a to specify fields which should not be serialized May 16, 2023
@jcrist
Copy link
Owner

jcrist commented May 16, 2023

Would #199 satisfy your needs? This wouldn't allow for dynamically deciding what fields are serialized/deserialized (as pydantic's exclude allows), but would allow statically omitting certain fields from the message structure.

@saolof
Copy link
Author

saolof commented May 16, 2023

Ah yes - treat this as a duplicate issue, sorry

@saolof saolof closed this as completed May 16, 2023
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

No branches or pull requests

2 participants