Hacker News new | ask | show | jobs
by breatheoften 1520 days ago
I really wish it preserved key order ... is quite annoying losing this at the storage layer ...
2 comments

So preserving key order is... nice for some things, but what's nice about JSONB is that it's optimized for reading and querying.
i am curious to known an example where key order would matter.
Had this exact issue. The UBL [1] standard has a primarty XML representation where the order of elements are enforced in the schema. It also has a JSON representation, so when going from JSON to XML the exact order is needed to obtain a valid XML.

[1] https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=...