fix JsonMap alphabetization
This commit is contained in:
@@ -10,6 +10,7 @@ import haxe.Json;
|
||||
import haxe.DynamicAccess;
|
||||
import sys.io.File;
|
||||
import sys.FileSystem;
|
||||
using StringTools;
|
||||
|
||||
typedef Jsonable<T> = {
|
||||
function stringify():String;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
(json.split "\n")]
|
||||
(lines.shift) // {
|
||||
(lines.pop) // }
|
||||
(+ "{\n" (.join (sort lines) "\n") "\n}")))
|
||||
(+ "{\n" (.join (sort (for line lines (if (line.endsWith ",") (substr line 0 -1) line))) ",\n") "\n}")))
|
||||
|
||||
(defNew [&prop :String jsonPath &prop :T defaultVal]
|
||||
[:Map<String,T> m (new Map)]
|
||||
|
Reference in New Issue
Block a user