pub fn try_detect_type(raw: &str) -> Value
Expand description
Function to try to detect value type from String
Only the following types are recognized :
bool
u64
i64
f64
String
(as fallback)
extern crate serde_value_utils;
use serde_value_utils::try_detect_type;
fn main() {
println!("{:?}", try_detect_type("6.5"));
}
Output:
F64(6.5)