in core/server/src/configs/config_provider.rs [181:200]
fn try_parse_value(value: &str) -> FigmentValue {
if value.starts_with('[') && value.ends_with(']') {
let value = value.trim_start_matches('[').trim_end_matches(']');
let values: Vec<FigmentValue> = value.split(',').map(Self::try_parse_value).collect();
return FigmentValue::from(values);
}
if value == "true" {
return FigmentValue::from(true);
}
if value == "false" {
return FigmentValue::from(false);
}
if let Ok(int_val) = value.parse::<i64>() {
return FigmentValue::from(int_val);
}
if let Ok(float_val) = value.parse::<f64>() {
return FigmentValue::from(float_val);
}
FigmentValue::from(value)
}