Comments (5)
Hello @ckcr4lyf,
I'm still, to this day, using the said "hack"...
I do not understand @nox answer, serde_urlencode
doesn't use https://github.com/servo/rust-url/ ?
Why is there no function to decode only the keys, not the values ?
id=6%206&abc=123&def=2%252
yieding {"id": "6%206", "def": "2%252", "abc": "123"}
as mentionned before.
Thanks
from serde_urlencoded.
You probably want to file an issue at https://github.com/servo/rust-url/ and use the percent_encoding
crate directly.
from serde_urlencoded.
@erwanvivien wondering if you were able to come across a solution? Thanks to your hack I am able to get my current code working (i.e no invalid UTF8 error), but receiving raw bytes in URL params is proving to be a problem to otherwise decode currently...
Current hack (inspired by yours: ckcr4lyf/kiryuu@2536307#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fcR29)
from serde_urlencoded.
I am not too sure myself, I wasn't really able to read the source that well... I will try and figure out if the % decoding is an issue at this library's usage of rust-url or it comes due to a higher level issue of auto decoding in rust-url
from serde_urlencoded.
@erwanvivien seems it is a design choice by the parent library to not support invalid UTF-8, as is mentioned in this spec which they follow - https://url.spec.whatwg.org/#urlencoded-parsing
Guess no choice except the hack, thanks for sharing it!
from serde_urlencoded.
Related Issues (20)
- Support serializing maps and nested structs HOT 3
- Support serializing bytes HOT 1
- Fail to properly deserialize sequences HOT 3
- Serialize serde_json::Value::Object contains Null/None get error Custom("unsupported value")
- Missing tags for releases 0.7.0 and 0.7.1
- Reconsider depending on URL HOT 3
- Consider switching from dtoa to ryu HOT 1
- Arrays support HOT 3
- Clarification request: What kind of structs can be deserialized to by this crate? HOT 3
- Release new version HOT 1
- Example for chrono::NaiveDateTime in qs HOT 5
- Please publish a new version HOT 4
- Support sequence-like values in a key-value map HOT 3
- Data did not match any variant of untagged enum
- Could we get more context on the errors? HOT 1
- Getting help section in the README is out-of-date
- Fresh serde_urlencoded v0.7.0 warning: use of deprecated associated function
- Yank serde_urlencoded 0.7.0 HOT 1
- Support deserializing `u128`/`i128`
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 serde_urlencoded.