{"id":72437,"library":"from-file","title":"From File","description":"A simple convenience to deserialize a Rust struct or Enum directly from a JSON or YAML file path.","status":"active","version":"0.1.3","language":"rust","source_language":null,"source_url":"https://github.com/shakyShane/from_file","tags":["deserialization","json","yaml","file","convenience"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nfrom_file = \"0.1.3\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add from_file","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"FromFile","correct":"use from_file::FromFile;"}],"quickstart":{"code":"use from_file::FromFile;\nuse serde::Deserialize;\n\n#[derive(Deserialize)]\nstruct Config {\n    name: String,\n}\n\nfn main() {\n    let config = Config::from_file(\"config.json\").unwrap();\n    println!(\"{}\", config.name);\n}","lang":"rust","description":"Deserializes a struct from a JSON or YAML file."},"warnings":[{"fix":"Add #[derive(Deserialize)] to your struct and ensure serde is in dependencies","message":"Requires serde derive for deserialization","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'conveni':5,25 'deseri':7,21 'direct':13 'enum':12 'file':2,19,24 'json':16,22 'path':20 'rust':9 'simpl':4 'struct':10 'yaml':18,23","created_at":"2026-06-17T18:39:10.003956+00:00","updated_at":"2026-06-17T18:39:10.003956+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/shakyShane/from_file","github":"https://github.com/shakyShane/from_file","docs":"https://docs.rs/from_file/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}