Is there a way to use to_string with struct names
Closed this issue · 3 comments
lukyxu commented
When using the ron::ser::to_string() function, the struct names option for the Serializer is set to false. Is there a way to run the same function but with struct names set to true? Since the output field of the Serializer struct is private, I was unable to rewrite the function in my own crate.
juntyr commented
You can use ron::ser::to_string_pretty(value, ron::ser::PrettyConfig::new().struct_names(true))
lukyxu commented
I was looking for this but it wasn't in v0.7.0. I see this has been added recently. Thanks.
juntyr commented
I'm glad I could help you :)