-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
serde transparently #466
Comments
Awesome! I think the implementation will be similar to flatten feature.
It's good to know how to see the generated code by python -m serde.insepct {source} {class} e.g. To see generated code for flatten example. python -m serde.inspect examples/flatten.py Foo
|
sorry, I was using my work account to comment, so I removed that, I'll still keep working on a PR though. |
After #255, type checking for deserialization is declared at the type level, not at deserialization invocation anymore, this leads to having no way to do type checking at a snippet like this (I actually have problem with
msgpack
, but I use JSON since it's more popular):One solution I'd like to propose is to have a
transparent
attribute, similar to what the Rust crateserde
has (transparent) which allows creating wrapper around a type without requiring using the target format's container type. So we'd have something likeThe text was updated successfully, but these errors were encountered: