-
Notifications
You must be signed in to change notification settings - Fork 126
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
Make #[derive(Debug)]
output compatible with ron
#550
Comments
Do you mean making RON fully compatible with Rust syntax? |
I mean making the output of For example, |
This may be possible to do. Ron has syntax for maps (since ron is a superset of JSON), so Do you want to submit a PR for this feature? This syntax addition would likely be feature-gated. Enabling the feature during serialisation would use the new syntax for structs (and struct-like enum variants), and enabling it during deserialisation would allow using the new syntax. My guess is that it may be as simple as modifying the current deserialize_struct impl (and its variant counterpart). If the struct name was found, it could peek for an opening curly brace and then expect a closing curly brace later, otherwise it would use the current parsing rules. The logic for guessing struct types in deserialize_any would also need to be amended (this case would actually be quite simple to handle). |
This makes ron useful in deserializing output of programs using default Debug trait of Rust.
The text was updated successfully, but these errors were encountered: