ron-rs/ron

PrettyPrint struct names

Opened this issue · 1 comments

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

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.