-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
It should be possible to sort a JsonArray in a simple way. One example would be to mimic the behavior of java.util.Collections.sort(List) and java.util.Collections.sort(List, Comparator).
Test cases should include: new JsonArray().add(4).add(2).add(3).sort() should return new JsonArray().add(2).add(3).add(4). Similarly for strings. new JsonArray().add(new JsonObject()).add(new JsonObject()).sort() should (probably) throw an exception. new JsonArray().add(new JsonObject()).add(new JsonObject()).sort((a, b) -> ...) should work.