fix degrade for pull req #464 (#468)

* fix degrade for pull req #464

* add trim
This commit is contained in:
James / hach1yon
2022-03-27 22:26:42 +09:00
committed by GitHub
parent e372605de6
commit 67cf88cddd
2 changed files with 4 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ pub fn value_to_string(value: &Value) -> Option<String> {
Value::Null => Option::None,
Value::Bool(b) => Option::Some(b.to_string()),
Value::Number(n) => Option::Some(n.to_string()),
Value::String(s) => Option::Some(s.to_string()),
Value::String(s) => Option::Some(s.trim().to_string()),
Value::Array(_) => Option::None,
Value::Object(_) => Option::None,
}