This may be a non-goal for sajson, but I wanted to preserve the order of keys, so I can write everything back to a file minimizing differences with the original file.
As a quick hack I added a couple of #ifdefs to disable key sorting and to remove affected functions:
https://github.com/project-gemmi/gemmi/commit/8668beeb012d6e2232e0cd39cf6434a06ed78b9c
Not sure if it's worth upstreaming, but just to let you know.
This may be a non-goal for sajson, but I wanted to preserve the order of keys, so I can write everything back to a file minimizing differences with the original file. As a quick hack I added a couple of #ifdefs to disable key sorting and to remove affected functions: https://github.com/project-gemmi/gemmi/commit/8668beeb012d6e2232e0cd39cf6434a06ed78b9c
Not sure if it's worth upstreaming, but just to let you know.