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
The current behaviour might be confusing when the type deserialises from a JSON string (see #13). Describing that the &str passed to FromStr::from_str is treated as a container containing the JSON string (i.e. the string slice must start and end with " so the content is a valid JSON string) and not the JSON string itself hopefully mitigates further confusion. The example I gave here could be enhanced and used as an example for the docs.
Also, the use of the expression "json string" is imprecise in the current docs. This should be amended, too, to avoid even more confusion.
The text was updated successfully, but these errors were encountered:
jofas
changed the title
Docs: describe behaviour of FromStrAsJson more thoroughly
Docs: describe behaviour of FromStrAsJson in case type deserialises from a JSON string (opposed to an object or array, for example)
Aug 2, 2024
The current behaviour might be confusing when the type deserialises from a JSON string (see #13). Describing that the
&str
passed toFromStr::from_str
is treated as a container containing the JSON string (i.e. the string slice must start and end with"
so the content is a valid JSON string) and not the JSON string itself hopefully mitigates further confusion. The example I gave here could be enhanced and used as an example for the docs.Also, the use of the expression "json string" is imprecise in the current docs. This should be amended, too, to avoid even more confusion.
The text was updated successfully, but these errors were encountered: