You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to truncate or set as None, or somehow accept without Error a string that is longer than the capacity of the String. Or is there some other way to deal with this in serde that you know of?
Serde deserialization return an error, doesn't panic.
This issue is about the 2nd, I guess?
IMO the default for deserializing a long string should be an error. Other behaviors (like truncating) should be opt-in. So I wouldn't change the current serde impls.
Truncating can be done with a wrapper, which doesn't necessarily have to be in the heapless crate. For example you can write your own parser and use the serde with attribute.
Hi,
I would like to truncate or set as None, or somehow accept without Error a string that is longer than the capacity of the String. Or is there some other way to deal with this in serde that you know of?
Related to: #359
Regards, Gaute
The text was updated successfully, but these errors were encountered: