-
-
Notifications
You must be signed in to change notification settings - Fork 923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[proposal] array of querystring without number . #2025
Comments
I'd back it up, considering I rarely see the |
Thanks for a reply. I tried implement it. ex) I think a nested array is unusual. Best regards, |
@alfa-jpn You should, since such functionality already exists. It should parse back to what you put into it: |
@isaaclyman How about making it configurable? ex) m.queryString.arrayWithNumber= // config
m.queryString.parse() // moved from 'parseQueryString'
m.queryString.build() // moved from 'buildQueryString'
m.queryString.arrayWithNumber=true // existing behaviour (default)
m.queryString.build({a: [1,2,3]}) // return "a[0]=1&a[1]=2&a[2]=3"
m.queryString.arrayWithNumber=false // unsupported a nested array
m.queryString.build({a: [1,2,3]}) // return "a[]=1&a[]=2&a[]=3" Best regards, |
@alfa-jpn I believe you tagged me by mistake. |
Sometimes, the github auto-completion has weird heuristics... |
Eh, I'd rather not. Not for such a simple utility. Worst case scenario, the old version can find its way here, and migration should be relatively painless after making that substitution. It's pretty simple if you just read the source code.
I'd have to vouch for that. At least it's not as bad as Gitter's, though (which I find myself frequently backspacing the name completed). 😄 |
@isaaclyman @isiahmeadows I implemented it for reference.
Best regards, |
@MithrilJS/collaborators This okay to shortlist for v2? We're kind of the exception here in generating and requiring integers. It's also a pretty simple one-line fix for |
Closing due to age. |
Hi,
This is a breaking change proposal about a querystring parser and builder.
Current Behavior
The object is lost a type when use number with brackets.
And, some servers do not handle query correctly.
for example,
The rack of ruby (ruby on rails) interpret
a[0]=1&a[1]=2
as Hash.Possible Solution
The querystring array does not use number with brackets.
Context
Your Environment
Can i implement it and send PR?
Best regards,
The text was updated successfully, but these errors were encountered: