-
Notifications
You must be signed in to change notification settings - Fork 2
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
Provide extra functions to return Options when the input is null as Serde usually does #4
Comments
I agree this would be very useful and make code safer. Turning an empty string into |
Agreed! I just looked into this issue now, but I concur that having additional functions such as In any case, I would welcome a PR to achieve these changes, else I can take a look into it when I have some time. |
Sounds great @rnag I've recommended Would be neat if it also covered the safer |
@saikrishna1-bidgely @corneliusroemer I've checked in code to a WIP branch and created a PR (#5) to incorporate the changes, please take a look and let me know any thoughts or feedback. The main points to note here:
TODOs:
|
rustc
) version: 1.66.0 (69f9c33d7 2022-12-12)Description
I want to get an Option when there is null value like Serde usually does. Currently, the exported functions only support types and not Options of those types.
I want some extra functions like
as_opt_bool, as_opt_f64, as_opt_i64, as_opt_string, as_opt_u64
which will return an Option of the respective data type.The text was updated successfully, but these errors were encountered: