Skip to content
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

Consider using serde_qs instead of serde_urlencoded for deserializing Query #504

Closed
theowenyoung opened this issue Nov 13, 2021 · 1 comment

Comments

@theowenyoung
Copy link

Feature Request

Motivation

Hi, for query string like key[]=value1&key[]=value2, serde_urlencoded will not respect it as an array, could we consider using serde_qs instead of serde_urlencoded for deserializing Query?

let value = serde_urlencoded::from_str(query)

Proposal

Just using serde_qs::from_str<T>(raw_query_string) instead of serde_urlencoded

Alternatives

Yes, now I can get the raw query string to parse it.

@davidpdrsn
Copy link
Member

davidpdrsn commented Nov 13, 2021

There is no standard way to serialize arrays in query strings, therefore serde_urlencoded doesn't support it. So I think its the right choice for axum. Note that warp and actix-web also uses serde_urlencoded.

See #434 for more details and a workaround.

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

No branches or pull requests

2 participants