diff --git a/src/bin.rs b/src/bin.rs index 334559a..d5558f6 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -69,6 +69,13 @@ fn read_context_from_stdin() -> serde_json::map::Map impl Renderable for serde_json::Value { fn render(&self) -> String { - self.to_string() + match self { + serde_json::Value::Null => "".to_owned(), + serde_json::Value::Bool(boolean) => boolean.to_string(), + serde_json::Value::Number(num) => num.to_string(), + serde_json::Value::String(string) => string.to_string(), + serde_json::Value::Array(_arr) => panic!("Attempted to render an array"), + serde_json::Value::Object(_obj) => panic!("Attempted to render an object"), + } } }