-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fields with skip_deserializing
not getting exported?
#143
Comments
Same problem here! Why this decision? 🙃 |
Hey @NyxCode, is this intended behavior? |
@escritorio-gustavo My use-case are mostly HTTP APIs. There, I'd want "skip_serializing" to skip the field when my TS is receiving data, and "skip_deserializing" to skip the field if my TS is sending data. One alternative I can see to the current behaviour (skip if "skip_serializing" or "skip_deserializing" is present) is to just ignore "skip_serializing" and "skip_deserializing" entirely. That's definetely a step forward, since you can then still skip the field with There might be usecases where it'd be nice to get both variants - like in the REST API example above. |
So I think the best way forward is to just ignore "skip_serializing" and "skip_deserializing" for now. Happy to be convinced of something else tho. |
Yeah, the fact that the data can go both from TS to Rust and from Rust to TS makes this a lot more complicated. |
Agreed! |
Hello!
Thanks for the great crate, I find it very useful!
I'm just wondering if there's a reason why fields marked with
#[serde(skip_deserializing)]
are getting skipped? I saw in the macro code that this is a deliberate decision, but I fail to see the reasoning behind it.As exporting types are in essence serializing them, I would logically assume that the bindings would still include those fields.
Best regards!
The text was updated successfully, but these errors were encountered: