Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.64 KB

File metadata and controls

40 lines (31 loc) · 1.64 KB

java-http-query-string-parser-builder

Build Status codecov

An RFC1867 compliant Java URL query string parser/builder

Which allow to build URLs query arguements with multidimensional array on popular forms like

queryBuilder({
    "search": {
        "categories": [
            1,
            2
        ],
        "criteria": {
            "foo": 1,
            "bar": "other"
        },
        "order": {
            "date": "desc",
            "name": "desc"
        }
    }
})
 // => encoded = "search%5Bcategories%5D%5B0%5D=1&search%5Bcategories%5D%5B1%5D=2&search%5Bcriteria%5D%5Bfoo%5D=1&search%5Bcriteria%5D%5Bbar%5D=other&search%5Border%5D%5Bdate%5D=desc&search%5Border%5D%5Bname%5D=desc"
 // => decoded = "search[categories][0]=1&search[categories][1]=2&search[criteria][foo]=1&search[criteria][bar]=other&search[order][date]=desc&search[order][name]=desc"

Tests & logic based on :

Projects struct based on :