Skip to content

samscott89/serde_qs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

227 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serde Querystrings badge-ci Latest Version Documentation

This crate is a Rust library for serialising to and deserialising from querystrings using serde. This crate is designed to extend serde_urlencoded when using nested parameters, similar to those used by qs for Node, and commonly used by Ruby on Rails via Rack.

The core of the library was inspired by serde_urlencoded. In order to support deserializing abitrarily nested structs encoded in arbitrary orders, we perform two passes over the input string. This adds a non-trivial amount of memory and compute, approximately a 50% overhead compared to serde_urlencoded. However, in absolute terms, deserialization is on the order of single-digit microseconds.

Similarly, serialization needs to buffer keys in case there are nested values, resulting in about 50% overhead.

For detailed benchmark documentation, see benches/README.md.

Installation

This crate works with Cargo and can be found on crates.io with a Cargo.toml like:

[dependencies]
serde_qs = "1.0"

Minimum supported Rust version is 1.85

For older versions of Rust, serde_qs versions <= 0.11 support Rust 1.36.

License

serde_qs is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in serde_qs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Serde support for querystring-style strings

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 39

Languages