fn read_data_file(file_path: &str) -> Result<Value, FileReadError> {
    println!("Reading data file...");
    let data = read_file(file_path)?;

    let data_str = str::from_utf8(&data)?;
    /*let data_str = r#"
    {
        "name": "John Doe",
        "age": 43,
        "phones": [
            "+44 1234567",
            "+44 2345678"
        ]
    }"#;*/
    println!("Data read: {}", data_str);
    let v: Value = serde_json::from_str(data_str)?;

    Ok(v)
}
// private function to read data from file path
private function to read data from file path
private function to read data from file path
fn read_data_file(file_path: &str) -> Result<Value, FileReadError> {
    println!("Reading data file...");
    let data = read_file(file_path)?;
    let data_str = str::from_utf8(&data)?;
    /*let data_str = r#"
    {
        "name": "John Doe",
        "age": 43,
        "phones": [
            "+44 1234567",
            "+44 2345678"
        ]
    }"#;*/
    println!("Data read: {}", data_str);
    let v: Value = serde_json::from_str(data_str)?;
    Ok(v)
}
fn read_data_file ( file_path : & str ) -> Result < Value , FileReadError > { println ! ( " " ) ; let data = read_file ( file_path ) ? ; let data_str = str :: from_utf8 ( & data ) ? ; /*let data_str = r#"
    {
        "name": "John Doe",
        "age": 43,
        "phones": [
            "+44 1234567",
            "+44 2345678"
        ]
    }"#;*/ println ! ( " " data_str ) ; let v : Value = serde_json :: from_str ( data_str ) ? ; Ok ( v ) }
private function to read data from file path
private function to read data from file path
file_path
&str
file_path
&str