(&self)
| 47 | |
| 48 | impl Registry { |
| 49 | pub fn to_json(&self) -> String { |
| 50 | match serde_json::to_string(self) { |
| 51 | Ok(json) => json, |
| 52 | Err(e) => { |
| 53 | eprintln!("Failed to serialize to JSON: {e}"); |
| 54 | String::new() |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | const ID: &str = "https://developer.microsoft.com/json-schemas/windows/registry/20230303/Microsoft.Windows.Registry.schema.json"; |