I have a JSON string[][string] associative array object that I want to take the .toPrettyString value of. However, it sorts the output alphabetically.

string[][string] aa = [ "abc" : [], "def" : [], "ghi" : [] ];
auto asJSON = JSONValue(aa);
writeln(asJSON.toPrettyString);

Output:

{
    "abc": [],
    "def": [],
    "ghi": []
}

https://run.dlang.io/is/F85azk

Is there a way to .retro the keys in the output so they appear in the reverse order?
  • Reverse JSON toPrettyString Anonymouse via Digitalmars-d-learn

Reply via email to