0

Every time I save file using JSONConf unit, json file is sorted in new order. E.g. "myname: {...}" can be saved to end of file or to middle of file (middle of key order).

How to set one sort order forever, e.g. sort by ABC. This way text editor can open file at same key at same offset.

Laz 1.5 svn, fpc 3.0.

Example of sort needed:

{
"aa":1,
"dd":1,
"tt":1,
"z":1
}
kometen
  • 6,536
  • 6
  • 41
  • 51
Prog1020
  • 4,530
  • 8
  • 31
  • 65
  • 1
    It's a JSON thing. The order of elements in an array is maintained, but not elements in an object. – David A Feb 14 '16 at 22:46
  • Does it really matter? I mean, the order is really important to you? Because a JSON object is much more like a hash and its elements are recovered "by name", not by their position inside the object. – Ed de Almeida Feb 20 '16 at 17:57
  • It's good for text editors. File opened in editor. and users want to see same place, same line. – Prog1020 Feb 20 '16 at 19:53

0 Answers0