fn collect_keys(prefix: &str, value: &Value) -> Vec<String> {
        let mut result = Vec::new();

        match value {
            Value::Bool(_) | Value::Number(_) | Value::String(_) | Value::Array(_) => {
                result.push(prefix.to_string())
            }
            Value::Object(o) => {
                for (k, v) in o {
                    result.append(&mut Self::collect_keys(&format!("{}.{}", prefix, k), &v));
                }
            }
            _ => (),
        }

        result
    }
// Find all objects and return their keys separated by dot
Find all objects and return their keys separated by dot
Find all objects and return their keys separated by dot
fn collect_keys(prefix: &str, value: &Value) -> Vec<String> {
        let mut result = Vec::new();
        match value {
            Value::Bool(_) | Value::Number(_) | Value::String(_) | Value::Array(_) => {
                result.push(prefix.to_string())
            }
            Value::Object(o) => {
                for (k, v) in o {
                    result.append(&mut Self::collect_keys(&format!("{}.{}", prefix, k), &v));
                }
            }
            _ => (),
        }
        result
    }
fn collect_keys ( prefix : & str , value : & Value ) -> Vec < String > { let mut result = Vec :: new ( ) ; match value { Value :: Bool ( _ ) | Value :: Number ( _ ) | Value :: String ( _ ) | Value :: Array ( _ ) => { result . push ( prefix . to_string ( ) ) } Value :: Object ( o ) => { for ( k , v ) in o { result . append ( & mut Self :: collect_keys ( & format ! ( " " prefix k ) , & v ) ) ; } } _ => ( ) , } result }
Find all objects and return their keys separated by dot
Find all objects and return their keys separated by dot
prefix
&str
value
&Value
prefix
&str
value
&Value