Skip to content

inzapp/treemap-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 7, 2019
a52c868 · Sep 7, 2019

History

5 Commits
Sep 6, 2019
Sep 6, 2019
Sep 6, 2019
Sep 7, 2019
Sep 7, 2019
Sep 6, 2019

Repository files navigation

Treemap JSON

JSON with custom comparator using treemap
You can sort json by json key

Download

https://github.com/inzapp/treemap-json/releases

Usage

JSONObject json = new JSONObject(new Comparator<String>() {
    @Override
    public int compare(String a, String b) {
        // parameter a, b is json key
        // just implement your comparator
        return a.compareTo(b);
    }
});

Using lambda expression

json = new JSONObject((Comparator<String>) (a, b) -> {
    return a.compareTo(b);
});

About

JSON with custom comparator using treemap

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages