We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I plan to fix the issue described below for encoding nested struct arrays.
Currently this structure
type Nested struct { A string `url:"theA,omitempty"` B string `url:"theB,omitempty"` } type NestedArr []Nested na := struct { A NestedArr `url:"arr"` B Nested `url:"nested"` }{ A: NestedArr{Nested{ A: "aa", B: "bb", }, Nested{ A: "aaa", B: "bbb"}}, B: Nested{ A: "zz", B: "xx", }, }
encode to
arr={aa bb}&arr={aaa bbb}&nested[theA]=zz&nested[theB]=xx
To be consistent with the Ruby style parsing the result should look like this
arr[0][theA]=aa&arr[0][theB]=bb&arr[1][theA]=aaa&arr[1][theB]=bbb&nested[theA]=zz&nested[theB]=xx
The text was updated successfully, but these errors were encountered:
@etxnija , this is a very old bug. We needed similar ruby like encoding. We have addressed this in our fork https://github.com/appscode/go-querystring .
Sorry, something went wrong.
I'll leave this issue open for anyone that still needs this and wants to implement.
Looks like @tamalsaha's initial implementation was pretty simple: appscode#2
@tamalsaha that one also give wrong for []string it gives something like this a%5B0%5D=1 instead of a[]=1
[]string
a%5B0%5D=1
a[]=1
No branches or pull requests
I plan to fix the issue described below for encoding nested struct arrays.
Currently this structure
encode to
To be consistent with the Ruby style parsing the result should look like this
The text was updated successfully, but these errors were encountered: