dflemstr / rq

Record Query - A tool for doing record analysis and transformation
Apache License 2.0
2.28k stars 57 forks source link

Preserve order of items in maps #234

Closed jcaesar closed 1 year ago

jcaesar commented 1 year ago

Minus one TODO. My first impulse was to reach for indexmap, but Value::Map is never actually accessed by key.

jcaesar commented 1 year ago

I noticed that once map order no longer depends on the key, the TOML problem #194 is easily solvable by reordering (and without affecting other formats like #221 does). I've added that to this PR. [Edit:] Using toml 0.6 fixes this issue more cleanly.