pub fn kv_encode(profile: &str) -> String {
    let m: serde_json::Value = serde_json::from_str(profile).unwrap();

    let mut result = String::from("");
    result.push_str("email=");
    result.push_str(m["email"].as_str().unwrap());
    result.push('&');
    result.push_str("uid=");
    result.push_str(&serde_json::to_string(&m["uid"]).unwrap());
    result.push('&');
    result.push_str("role=");
    result.push_str(m["role"].as_str().unwrap());

    result
}
/// encoding for key-value pairs
///
/// Solution for problem 5 from set 2: <https://cryptopals.com/sets/2/challenges/13>
encoding for key-value pairs
Solution for problem 5 from set 2.
encoding for key - value pairs Solution for problem 5 from set 2 .
pub fn kv_encode(profile: &str) -> String {
    let m: serde_json::Value = serde_json::from_str(profile).unwrap();
    let mut result = String::from("");
    result.push_str("email=");
    result.push_str(m["email"].as_str().unwrap());
    result.push('&');
    result.push_str("uid=");
    result.push_str(&serde_json::to_string(&m["uid"]).unwrap());
    result.push('&');
    result.push_str("role=");
    result.push_str(m["role"].as_str().unwrap());
    result
}
pub fn kv_encode ( profile : & str ) -> String { let m : serde_json :: Value = serde_json :: from_str ( profile ) . unwrap ( ) ; let mut result = String :: from ( " " ) ; result . push_str ( " " ) ; result . push_str ( m [ " " ] . as_str ( ) . unwrap ( ) ) ; result . push ( '&' ) ; result . push_str ( " " ) ; result . push_str ( & serde_json :: to_string ( & m [ " " ] ) . unwrap ( ) ) ; result . push ( '&' ) ; result . push_str ( " " ) ; result . push_str ( m [ " " ] . as_str ( ) . unwrap ( ) ) ; result }
encoding for key-value pairs
Solution for problem 5 from set 2: <https://cryptopals.com/sets/2/challenges/13>
encoding for key - value pairs Solution for problem 5 from set 2 : <https : // cryptopals . com / sets / 2 / challenges / 13 >
profile
&str