Crate querystrong

source ·
Expand description

QueryStrong: A flexible interface for querystrings

Example:

use querystrong::{QueryStrong, Value};
let mut qs = QueryStrong::parse("user[name][first]=jacob&user[language]=rust")?;
assert_eq!(qs["user[name][first]"], "jacob");
assert_eq!(qs["user"].get_str("language"), Some("rust"));
assert_eq!(qs.get_str("user[language]"), Some("rust"));
assert!(qs["user"].is_map());
assert!(qs["user[name]"].is_map());

qs.append("user[name][last]", "rothstein")?;
qs.append("user[language]", "english")?;
assert_eq!(
  qs.to_string(),
  "user[language][]=rust&user[language][]=english&\
  user[name][first]=jacob&user[name][last]=rothstein"
);

Structs

Enums

Type Definitions