mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-09 14:28:53 +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:
@@ -490,7 +490,7 @@ impl Script for RldScript {
|
||||
serde_yaml_ng::to_string(&names)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to serialize to YAML: {}", e))?
|
||||
} else {
|
||||
serde_json::to_string(&names)
|
||||
serde_json::to_string_pretty(&names)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to serialize to JSON: {}", e))?
|
||||
}
|
||||
} else {
|
||||
@@ -498,7 +498,7 @@ impl Script for RldScript {
|
||||
serde_yaml_ng::to_string(&self.ops)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to serialize to YAML: {}", e))?
|
||||
} else {
|
||||
serde_json::to_string(&self.ops)
|
||||
serde_json::to_string_pretty(&self.ops)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to serialize to JSON: {}", e))?
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user