Every time you call .to-json, this class outputs the keys in a different order. It would be very helpful if .to-json always output the keys in a fixed order, especially for keeping git patches more helpfully concise.
In an ideal world, we could all agree on what that order was and it probably wouldn't alphabetical because the most important information is problem name, version, authors, license, source, with depends, resources, and other bits toward the bottom, but even alphabetical order would be better than order by random.
It should be possible to make it alphabetical by passing the :sorted-keys option to JSON::Fast, which ultimate performs the serialization. However, that has to go through JSON::Class and JSON::Marshal somehow.
Every time you call
.to-json, this class outputs the keys in a different order. It would be very helpful if.to-jsonalways output the keys in a fixed order, especially for keeping git patches more helpfully concise.In an ideal world, we could all agree on what that order was and it probably wouldn't alphabetical because the most important information is problem name, version, authors, license, source, with depends, resources, and other bits toward the bottom, but even alphabetical order would be better than order by random.
It should be possible to make it alphabetical by passing the
:sorted-keysoption to JSON::Fast, which ultimate performs the serialization. However, that has to go through JSON::Class and JSON::Marshal somehow.