pub(crate) fn json_to_config_val( json: &Value, template: &ConfigVal, ) -> Result<ConfigVal, Error>
Convert a JSON value to a ConfigVal, using the existing value as a template for the type