-
Notifications
You must be signed in to change notification settings - Fork 123
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
Roudtrip RON <-> JSON #543
Comments
Yes, that is expected behaviour. RON is a superset of JSON, so all JSON documents are valid RON documents. But RON also supports structs and enums with a Rusty syntax, which is not supported by JSON. In your TLDR: RON can roundtrip JSON documents (through JSON and RON), but not RON documents through JSON. Still, a reformulation of this issue is on my long-term TODO list. |
Ok that makes sense thanks for the explanation |
It seems we can convert from RON to JSON but the inverse has unexpected behavior, calling
ron::to_string_pretty()
on aserde_json::Value
outputs json, not ron.The text was updated successfully, but these errors were encountered: