You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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)
andjava.util.Collections.sort(List, Comparator)
.Test cases should include:
new JsonArray().add(4).add(2).add(3).sort()
should returnnew 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.The text was updated successfully, but these errors were encountered: