You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
querystring.stringify can't deal with nested objects #1665
If that behaviour is deliberate and desired it would be useful if at least a warning was issued. Otherwise unless you parse and check the result you don't know that a (potentially big) chuck of info just went missing.
Activity
isaacs commentedon Sep 8, 2011
It used to do this. It was terrible.
Use
npm install qs, or usefoo[bar]as the key in your object.AD7six commentedon Sep 12, 2011
If that behaviour is deliberate and desired it would be useful if at least a warning was issued. Otherwise unless you parse and check the result you don't know that a (potentially big) chuck of info just went missing.
isaacs commentedon Sep 12, 2011
I agree. Wanna try a patch and send a pull request? Should be about one line. Make sure to sign the CLA: http://nodejs.org/cla.html
AD7six commentedon Sep 13, 2011
sure thing. #1691 created I hope that's an appropriate change.
thatmarvin commentedon Oct 26, 2011
I'm curious—why was it terrible?
josser commentedon Aug 23, 2012
I'm curious too, why this was changed?
Here the use-case:
I want to make a post on the wall via facebook graph api:
Post data:
{message: "something on the wall", privacy:{ value: "CUSTOM", friends: "SELF"}}
So how I can stringify this data and pass result to request module?
kaore commentedon Aug 3, 2013
Why was it terrible?
ownagedj commentedon Oct 21, 2015
Why hasn't this been resolved?
MichaelArnoldOwens commentedon Jan 14, 2016
What's going on with this issue?
mrdulin commentedon Jun 17, 2016
result:
lilyszhang commentedon Jul 19, 2017
Has this issue been fixed, or is it still necessary to use npm install qs?
TimothyGu commentedon Jul 20, 2017
@lilyszhang No. If you want to use the nested syntax, use
qs.Why was it terrible?
query[a][b][c][][d][3][weird]=2is slow and complex no matter how you turn it.BTW, it was removed in 422d3c9.