Skip to content
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

Docs: describe behaviour of FromStrAsJson in case type deserialises from a JSON string (opposed to an object or array, for example) #18

Open
Tracked by #15
jofas opened this issue Aug 2, 2024 · 0 comments

Comments

@jofas
Copy link
Owner

jofas commented Aug 2, 2024

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.

@jofas 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
@jofas jofas mentioned this issue Aug 2, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant