pub fn matchers_from_json(value: &Value, deprecated_name: &Option<String>) -> MatchingRules {
  let matchers_json = match (value.get("matchingRules"), deprecated_name.clone().and_then(|name| value.get(&name))) {
    (Some(v), _) => Some(v),
    (None, Some(v)) => Some(v),
    (None, None) => None
  };

  let mut matching_rules = MatchingRules::default();
  match matchers_json {
      Some(value) => match value {
        &Value::Object(ref m) => {
            if m.keys().next().unwrap_or(&String::default()).starts_with("$") {
                matching_rules.load_from_v2_map(m)
            } else {
                matching_rules.load_from_v3_map(m)
            }
        },
        _ => ()
      },
      None => ()
  }
  matching_rules
}
/// Parses the matching rules from the Value structure
Parses the matching rules from the Value structure
Parses the matching rules from the Value structure
pub fn matchers_from_json(value: &Value, deprecated_name: &Option<String>) -> MatchingRules {
  let matchers_json = match (value.get("matchingRules"), deprecated_name.clone().and_then(|name| value.get(&name))) {
    (Some(v), _) => Some(v),
    (None, Some(v)) => Some(v),
    (None, None) => None
  };
  let mut matching_rules = MatchingRules::default();
  match matchers_json {
      Some(value) => match value {
        &Value::Object(ref m) => {
            if m.keys().next().unwrap_or(&String::default()).starts_with("$") {
                matching_rules.load_from_v2_map(m)
            } else {
                matching_rules.load_from_v3_map(m)
            }
        },
        _ => ()
      },
      None => ()
  }
  matching_rules
}
pub fn matchers_from_json ( value : & Value , deprecated_name : & Option < String > ) -> MatchingRules { let matchers_json = match ( value . get ( " " ) , deprecated_name . clone ( ) . and_then ( | name | value . get ( & name ) ) ) { ( Some ( v ) , _ ) => Some ( v ) , ( None , Some ( v ) ) => Some ( v ) , ( None , None ) => None } ; let mut matching_rules = MatchingRules :: default ( ) ; match matchers_json { Some ( value ) => match value { & Value :: Object ( ref m ) => { if m . keys ( ) . next ( ) . unwrap_or ( & String :: default ( ) ) . starts_with ( " " ) { matching_rules . load_from_v2_map ( m ) } else { matching_rules . load_from_v3_map ( m ) } } , _ => ( ) } , None => ( ) } matching_rules }
Parses the matching rules from the Value structure
Parses the matching rules from the Value structure
value
&Value
deprecated_name
&Option<String>
value
&Value
deprecated_name
&Option<String>