Re:Son – A minimal subset of JSON for machine-to-machine com...
by kbenson on Tuesday March 14, 2017 @05:03PM
(#13871457)
Hmm, then maybe the easiest solution is to sort numerically by unicode code point, and accept that combining characters will look weird.
Or are there problems with that as well that I'm not considering (beyond it being less human readable)?
Re:Son – A minimal subset of JSON for machine-to-machine com...
by seagreen on Tuesday March 14, 2017 @06:06PM
(#13871917)
I think the way to go is definitely by code point. We don't want to pull any more of the Unicode spec into Son than we have to.
Happily sorting is only used to order members within Son objects. Individual strings are never sorted, so there isn't a worry about sorted strings coming out messy.
NTFS, which has to build a b-tree of filenames in a permanently stable sort order, solved this by writing the collation table to the disk when it's formatted, and never changing it again. Which means the Windows shell still has to re-sort the filenames because the currently "correct" collation may be different.