diff --git a/Cargo.lock b/Cargo.lock index 5f8b51b..37dc95e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1202,7 +1202,7 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "webhookey" -version = "0.1.0-rc.0" +version = "0.1.0-rc.1" dependencies = [ "anyhow", "dirs", diff --git a/Cargo.toml b/Cargo.toml index 7c75771..f27176a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "webhookey" -version = "0.1.0-rc.0" +version = "0.1.0-rc.1" authors = ["finga "] edition = "2018" license = "GPL-3.0-or-later" diff --git a/src/main.rs b/src/main.rs index 79c126a..d773821 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,7 +204,7 @@ fn replace_parameter(input: &str, headers: &HeaderMap, data: &serde_json::Value) fn get_string(value: &serde_json::Value) -> Result { match &value { serde_json::Value::Null => unimplemented!(), - serde_json::Value::Bool(_bool) => unimplemented!(), + serde_json::Value::Bool(bool) => Ok(bool.to_string()), serde_json::Value::Number(number) => Ok(number.to_string()), serde_json::Value::String(string) => Ok(string.as_str().to_string()), serde_json::Value::Array(_array) => unimplemented!(), @@ -229,6 +229,7 @@ fn filter_match( if let Some(json_value) = data.pointer(parameter) { *data.pointer_mut(parameter).unwrap() = match json_value { + serde_json::Value::Bool(bool) => serde_json::Value::String(bool.to_string()), serde_json::Value::String(string) => serde_json::Value::String(string.to_string()), serde_json::Value::Number(number) => serde_json::Value::String(number.to_string()), x => {