[GH-ISSUE #302] [BUG] Alphabet sort on JSON #299

Closed
opened 2026-03-03 19:17:15 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Oct 16, 2019).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/302

Originally assigned to: @NghiaTranUIT on GitHub.

🐶 Brief

Some users report that the JSON keys are sorted unexpectedly.

Screen Shot 2019-10-16 at 11 33 56

We should fix it 👍

👑 Criteria

  • Check why JSON's keys are sort and fix it
Originally created by @NghiaTranUIT on GitHub (Oct 16, 2019). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/302 Originally assigned to: @NghiaTranUIT on GitHub. ## 🐶 Brief Some users report that the JSON keys are sorted unexpectedly. <img width="532" alt="Screen Shot 2019-10-16 at 11 33 56" src="https://user-images.githubusercontent.com/5878421/66888479-e68e4980-f008-11e9-8c78-b33a6db7d349.png"> We should fix it 👍 ## 👑 Criteria - [ ] Check why JSON's keys are sort and fix it
kerem 2026-03-03 19:17:15 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 31, 2020):

All done 🎉

It's complicated than my initial thought.

As Proxyman uses nlohmann/json as a high performance JSON parsers, but the library does not preserve the insertion order of object elements.

Use fifo_map as a workaround.

<!-- gh-comment-id:580592351 --> @NghiaTranUIT commented on GitHub (Jan 31, 2020): All done 🎉 It's complicated than my initial thought. As Proxyman uses [nlohmann/json](https://github.com/nlohmann/json#order-of-object-keys) as a high performance JSON parsers, but the library does not preserve the insertion order of object elements. Use `fifo_map` as a [workaround](https://github.com/nlohmann/json/issues/485#issuecomment-333652309).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#299
No description provided.