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

PrettyPrint struct names #411

Open
Tracked by #397
JakkuSakura opened this issue Oct 4, 2022 · 1 comment
Open
Tracked by #397

PrettyPrint struct names #411

JakkuSakura opened this issue Oct 4, 2022 · 1 comment

Comments

@JakkuSakura
Copy link

JakkuSakura commented Oct 4, 2022

Is it possible to

  1. read a config
  2. prettyprint the ron::Value, while maintaining all struct names
  3. optionally convert the struct names to a tag when converting to serde_json::Value
@juntyr
Copy link
Member

juntyr commented Oct 4, 2022

The ron Value currently does not yet support storing struct names, but we are exploring the option. Since ron does not distinguish between structs and enums in its data format, in the future it should be possible to serialise the Value into json and preserve the struct names as if they were enum names. However, those would probably be serialised more like single element maps. Though at that point you could write your own Value newtype that customises how structs are serialised.

@juntyr juntyr mentioned this issue Aug 18, 2023
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants