Post #2457011
2026-04-22 23:52 UTC
@Pol@mathstodon.xyz Nice, congrats! I noticed there's some json parsing code in there, you might be able to use serde_json::from_str and serde_json::Value. When you enable the indexmap feature the dict/map variant should retain the original key order. :)
Replies (1)
-
@Pol@mathstodon.xyz 2026-04-23 04:59
@kpcyrd@chaos.social hello kp, I wanted to use it initially and I did something with it but it has some limitations. First, it changes the indentation, then it removes comments, last, it changes some values sometimes (Unicode escape, number formatting with scientific notation). Basically it doesn't have the limitations that json-sort-cli has (https://github.com/tillig/json-sort-cli#known-issues). This is the reason why it embeds its own parser. I know comments are not JSON standard, but they exist... I want json-sort to do only one thing without messing around with the rest.