use std::fs; use serde_json::Value; use std::env; fn main() { // Check arguments let args: Vec = env::args().collect(); if args.len() < 2 { println!(“Please specify the path to your file.”); return; } // Read in File let file_path = &args[1]; let file_content = fs::read_to_string(file_path) .expect(“File could not be read.”); // Parse JSON let json_data: Value = serde_json::from_str(&file_content) .expect(“Invalid JSON format.”); // Print JSON println!(" JSON-content:\n{}”, json_data); }