Reverse JSON toPrettyString
Anonymouse
asdf at asdf.net
Mon Dec 17 22:09:11 UTC 2018
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?
More information about the Digitalmars-d-learn
mailing list