Comments (3)
My Query string encoder and parser
https://github.com/hetiansu5/urlquery
from go-querystring.
I think /test?filter[size]=large&filter[size]=small&filter[color]=red&filter[color]=blue
is not a correct query string referred to map[string][]string
, the correct string is /test?filter[0][size]=large&filter[1][size]=small&filter[0][color]=red&filter[1][color]=blue
.
I had implemented an url query string parser, but it can not parse map[string][]string.
For map structure, it has so limit on reflect
, it works well in map[Basic Structure]Basic Strucure.
And I have a suggestion, you could use a struct to implement it.
type Query struct {
Filter []string `query:"filter"`
}
from go-querystring.
I'm not planning to add support for parsing, but have added links to several projects that do in the README: https://github.com/google/go-querystring#alternatives
from go-querystring.
Related Issues (20)
- Encoder interface not respected for `interface{}` types HOT 2
- Allow arbitrary delimiter for slice/array type params
- Support for Unmarshaler / Marshaler HOT 2
- "query string" for GitHub search HOT 1
- add `decode` method HOT 1
- Slice (Array) pointer does not result in array query values HOT 1
- Is there a way to write a custom marshaller for my custom type? HOT 1
- Unable to handle nil pointers when implementing Encoder HOT 6
- can you please update the tag? HOT 3
- Querystring not adding [] for the array types HOT 1
- Add support for JSON encoding a struct field
- Different behavior on encoding empty slice with any del tag and without HOT 2
- Supporting slices HOT 2
- Structure fields original order messed up HOT 2
- Custom `String` implementations are not respected HOT 7
- Support RFC Specific Encoding HOT 7
- How to encode nested structure by my way? HOT 1
- Support pointer method (*Type)EncodeValues on the Encoder interface HOT 2
- Add support for struct field name casing options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-querystring.