mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-08 05:48:46 +08:00
Changed some scripts dumped JSON to pretty print JSON
Formated code Add protect when read vector of data
This commit is contained in:
@@ -133,7 +133,7 @@ impl Script for BGIBsiScript {
|
||||
serde_yaml_ng::to_string(&self.data)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to serialize to YAML: {}", e))?
|
||||
} else {
|
||||
serde_json::to_string(&self.data)
|
||||
serde_json::to_string_pretty(&self.data)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to serialize to JSON: {}", e))?
|
||||
};
|
||||
let mut writer = crate::utils::files::write_file(filename)?;
|
||||
|
||||
Reference in New Issue
Block a user