Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Breaking change in querystring.parse from v0.2.4 to v0.3.3 #566

Closed
alexgorbatchev opened this issue Jan 20, 2011 · 3 comments
Closed

Breaking change in querystring.parse from v0.2.4 to v0.3.3 #566

alexgorbatchev opened this issue Jan 20, 2011 · 3 comments

Comments

@alexgorbatchev
Copy link

~ $> nvm use v0.2.4
Now using node v0.2.4
~ $> node
> querystring = require('querystring');
> querystring.parse("b[]=1")
****{ b: [ '1' ] }****
> querystring.parse("b[]=1&b[]=2")
****{ b: [ '1', '2' ] }****

~ $> nvm use v0.3.3
Now using node v0.3.3
~ $> node
> querystring = require('querystring');
> querystring.parse("b[]=1")
****{ 'b[]': '1' ] }****
> querystring.parse("b[]=1&b[]=2")
****{ 'b[]': [ '1', '2' ] }****

This is a regression. It's especially bad in the case of "b[]=1" which results in a string instead of array of one.

@luebken
Copy link

luebken commented Feb 2, 2011

It probably won't be fixed:
"querystring.parse and querystring.stringify were made simpler. They no longer handle deep objects."
https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3

@japj
Copy link

japj commented Jul 6, 2011

the migration guide suggests to use node-querystring for nested support.
if that is acceptable then this issue can be closed?

@japj
Copy link

japj commented Jul 23, 2011

@isaacs can you close this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants