pub fn to_v2_json(&self) -> HashMap<String, Value> {
    let mut map = hashmap!{};

    if self.name == "body" {
      for (k, v) in self.rules.clone() {
        map.insert(k.replace("$", "$.body"), v.to_v2_json());
      }
    } else {
      for (k, v) in self.rules.clone() {
        map.insert(format!("$.{}.{}", self.name, k), v.to_v2_json());
      }
    }

    map
  }
/// Returns a JSON Value representation in V2 format
Returns a JSON Value representation in V2 format
Returns a JSON Value representation in V2 format
pub fn to_v2_json(&self) -> HashMap<String, Value> {
    let mut map = hashmap!{};
    if self.name == "body" {
      for (k, v) in self.rules.clone() {
        map.insert(k.replace("$", "$.body"), v.to_v2_json());
      }
    } else {
      for (k, v) in self.rules.clone() {
        map.insert(format!("$.{}.{}", self.name, k), v.to_v2_json());
      }
    }
    map
  }
pub fn to_v2_json ( & self ) -> HashMap < String , Value > { let mut map = hashmap ! { } ; if self . name == " " { for ( k , v ) in self . rules . clone ( ) { map . insert ( k . replace ( " " , " " ) , v . to_v2_json ( ) ) ; } } else { for ( k , v ) in self . rules . clone ( ) { map . insert ( format ! ( " " self name k ) , v . to_v2_json ( ) ) ; } } map }
Returns a JSON Value representation in V2 format
Returns a JSON Value representation in V2 format
&self
&self