You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In JS, dictionnaries are ordered so when the parser will build the document, it'll add them in the order it found them.
For the same reason, when the stringifier iterates on the object properties, it'll add them in the order you registered
You can verify this behaviour in your browser:
Reordering objects is achievable but kind of tedious
However, the mentionned issue is because when using an array element, the stringifier will iterate over it at once, effectively loosing order for this particular datatype if your elements were spread across the same node, but for the documents without array you can exploit the behaviour described above
Activity
[-]Add preserverOrder option[/-][+]xml: Add preserverOrder option[/+]lowlighter commentedon May 30, 2025
It is technically already (partially) possible, though there's an open issue for that:
node["~children"]instringify()to offer custom ordering ? #57In JS, dictionnaries are ordered so when the parser will build the document, it'll add them in the order it found them.
For the same reason, when the stringifier iterates on the object properties, it'll add them in the order you registered
You can verify this behaviour in your browser:

Reordering objects is achievable but kind of tedious
However, the mentionned issue is because when using an array element, the stringifier will iterate over it at once, effectively loosing order for this particular datatype if your elements were spread across the same node, but for the documents without array you can exploit the behaviour described above