NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #213 most downloaded on crates.io
`x-www-form-urlencoded` meets Serde
Last release 5 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.4 years
Some releases are documented
notes for 8 of 18 stable releases
1 version withdrawn
withdrawn after publishing
10 years old
19 releases · first in 2016
Nothing published for this version
Nothing published for this version
Nothing published for this version
51: feat: allow serialization of unit structs r=nox a=fdehau
51: feat: allow serialization of unit structs r=nox a=fdehau
fix #50
Co-authored-by: Florian Dehau work@fdehau.com
One column per quarter.
54: Don't use CowStrDeserializer (fixes #53 ) r=nox a=nox
54: Don't use CowStrDeserializer (fixes #53) r=nox a=nox
Co-authored-by: Anthony Ramine n.oxyde@gmail.com
45: Fix struct newtype deserialization (and add tests) r=nox a=samsieber
45: Fix struct newtype deserialization (and add tests) r=nox a=samsieber
Fixes #41
I only had to fix the deserializer - the serialization already works. So now they work the same way - you can serialize something and then deserialize it losslessly.
I also added tests for serialization and deserialization. Let me know if there's anything you'd like changed.
Co-authored-by: Sam Sieber swsieber@gmail.com
30: Support deserializing a (keyword) string into a unit-only enum r=nox a=smangelsdorf
30: Support deserializing a (keyword) string into a unit-only enum r=nox a=smangelsdorf
This adds support for deserializing a structure such as:
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
enum SortOrder {
Asc,
Desc,
}
#[derive(Serialize, Deserialize, Debug)]
struct SearchOptions {
sort: SortOrder,
}This is already supported for serialization (and I've added a test case for the existing support as part of this PR), but attempting to deserialize the string "sort=asc" would result in the error:
invalid type: string "asc", expected enum SortOrder
I've made a sample in the playground of the way this is handled in serde_urlencoded vs serde_json: https://play.rust-lang.org/?gist=75fc1e5bbbc1eec29a472373d47488a0&version=stable
This brings the behaviour in line with the way serde_json currently handles this case, which I hope is appropriate. Happy to tweak the behaviour if there's a better way to handle it.
Co-authored-by: Shaun Mangelsdorf s.mangelsdorf@gmail.com
32: Bump version to 0.5.2 r=nox a=nox
32: Bump version to 0.5.2 r=nox a=nox
Co-authored-by: Anthony Ramine n.oxyde@gmail.com
25: Deserialize () from input without key/value pairs. r=nox Currently there's no input that can be deserialized to () , this changes the crate to sup
25: Deserialize () from input without key/value pairs. r=nox
Currently there's no input that can be deserialized to (), this changes the crate to support deserializing strings without any key/value pair to a () (such as the empty string, or just "&").
Would be great if you could release a patch for this, I have a project that needs this behavior.
EDIT: To expand on my use case, I have a trait which parses the body of an HTTP Request into a type (e.g. for a POST request). However, this is abstract over HTTP methods, and its expected to be able to parse an empty body (e.g. from a GET request) into ().
23: Update to serde 1.0.0 r=nox
23: Update to serde 1.0.0 r=nox
22: Have a custom type for deserialising values (fixes #16 ) r=nox
22: Have a custom type for deserialising values (fixes #16) r=nox
13: Inline docs of reexports and bump version to 0.4.2
13: Inline docs of reexports and bump version to 0.4.2
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →