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
NOTE: This is basically #2438 which was closed due to being a duplicate of #1587. #1587 is about changing that behavior (which is probably impossible given serde's backward compatibility guarantees). This issue (and the closed #2438) are about documenting the existing behavior.
NOTE: This is basically #2438 which was closed due to being a duplicate of #1587. #1587 is about changing that behavior (which is probably impossible given serde's backward compatibility guarantees). This issue (and the closed #2438) are about documenting the existing behavior.
Last time I saw this was https://old.reddit.com/r/rust/comments/1332t9b/ji7oo8m/, but I've also seen it earlier and found it surprising both times.
Basically both
{"hello": "test", "value": 42}
(expected) and["test", 42]
deserialize perfectly fine into the following struct:Since this is not mentioned anywhere, this can accidentally become a used API when serde is used to parse JSON (Hyrum's law).
It would be nice if this could be featured somewhere prominently in the docs. I couldn't actually find it there, even looking for it.
The text was updated successfully, but these errors were encountered: