krasa / StringManipulation

IntelliJ plugin - https://plugins.jetbrains.com/plugin/2162
Apache License 2.0
694 stars 81 forks source link

JSON Sort feature merges keys with different casing #189

Closed angelinuxx closed 1 year ago

angelinuxx commented 1 year ago

Describe the bug JSON Sort of:

{
    "key": "key",
    "Key": "Key",
    "kEy": "kEy",
    "KEY": "KEY"
}

results in:

{
   "key": "KEY"
}

To Reproduce Steps to reproduce the behavior:

  1. Right-click on JSON file
  2. Choose String Manipulation > Sort/Shuffle/Reverse... > JSON Sort

Expected behavior Expected JSON after sort:

{
    "KEY": "KEY",
    "Key": "Key",
    "kEy": "kEy",
    "key": "key"
}

Environment : WebStorm 2022.2.2 Build #WS-222.4167.31, built on September 14, 2022 Runtime version: 17.0.4+7-b469.53 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.15.0-47-generic GC: G1 Young Generation, G1 Old Generation Memory: 1960M Cores: 8

Non-Bundled Plugins: ua.in.dej.myEmmet (1.2.5) dev.lankydan.palenightintellijtheme (0.0.8) String Manipulation (9.5.1) com.mallowigi (73.0.0) izhangzhihao.rainbow.brackets (6.26) ru.adelf.idea.dotenv (2022.2)

Current Desktop: ubuntu:GNOME