Erroneous building of variable length arrays
Gifts opened this issue · 4 comments
Gifts commented
parsed = parser.parse('a[]=1&a[]=2')
print builder.build(parsed)
Expected: a[]=1&a[]=2
Result: a[][0]=1&a[][1]=2
bernii commented
Hmm tried your example and added it as a new unit test case (at the end of https://github.com/bernii/querystring-parser/blob/master/querystring_parser/tests.py). Seems to be returning an expected result (a[]=1&a[]=2).
Could you comment on that? I've also added CI via Travis and test are passing.
Gifts commented
It's weird, test passes, but using interactive python shell returns me unexpected result. Maybe encoding issues?
Gifts commented
Oops, my bad, was trying to build upon string object, not result of parser.parse. Closed
bernii commented
Thanks :)