This example program probably ought to exit successfully
fn main() {
let input = "{}";
let v: ron::Value = ron::from_str(input).unwrap();
println!("{:?}", v);
let ser = ron::to_string(&v).unwrap();
println!("{:?}", ser);
let roundtrip = ron::from_str(&ser).unwrap();
println!("{:?}", roundtrip);
assert_eq!(v, roundtrip);
}
But it doesn't:
Map(Map({}))
"({})"
Seq([Map(Map({}))])
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `Map(Map({}))`,
right: `Seq([Map(Map({}))])`', src/main.rs:9:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This actually continues indefinitely. "{}" becomes "({})" which becomes "[({})]" and from then on we just add square brackets every round-trip.