You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- With `serde_url_params` returns `food=baguette&food=with&food=cheese`.
7
-
- With `yaup` it returns `food=baguette,with,cheese`.
3
+
Serialize your structures as query parameters.
4
+
I made this crate because I didn't find anything that matched the structure of the query parameters used in Meilisearch.
8
5
9
-
And I got rids of the serialization of embedded structures.
6
+
Specificities of this query parameters format:
7
+
- The crate writes the initial `?` if there are parameters to send.
8
+
- You can only serialize structures that follow a "key-value" shape, like structures, `HashMap`, `BTreeMap`, etc.
9
+
- Sequences (arrays, vectors, tuples, etc) are comma-separated. `{ doggo: vec!["kefir", "echo"] }` serialize as `?doggo=kefir,echo`.
10
+
- Empty and `null` values are not ignored. `{ doggo: Vec::new(), catto: None }` serialize as `?doggo=&catto=null`.
11
+
- Return an error if you try to serialize a structure with multiple levels of key-value structures (i.e., an object containing a `HashMap` for example).
0 commit comments