querystring-parser icon indicating copy to clipboard operation
querystring-parser copied to clipboard

[Question] Why isn't this standard behavior of urllib.parse.parse_qs?

Open mecampbellsoup opened this issue 3 years ago • 2 comments

Title says it all - why the HECK isn't this standard behavior for urllib.parse.parse_qs - surely we have all asked this question at some point, hoping y'all have some context!

mecampbellsoup avatar Mar 08 '22 00:03 mecampbellsoup

Because array and object notation in query strings are not defined by the HTTP specification.

Since these conventions are not standardized, the specific way it's done varies by library.

It wouldn't be appropriate for a language's core implementation to choose any particular way of doing it.

paulmelnikow avatar Mar 08 '22 01:03 paulmelnikow

Thanks @paulmelnikow. So, in summary then, for parsing any sort of nested querystring data, one needs to use a library like this?

mecampbellsoup avatar Mar 08 '22 13:03 mecampbellsoup