Changed some scripts dumped JSON to pretty print JSON

Formated code
Add protect when read vector of data
This commit is contained in:
2026-01-23 13:28:24 +08:00
parent fed9a155a0
commit 9321d931d6
6 changed files with 43 additions and 9 deletions

View File

@@ -367,7 +367,7 @@ impl Script for CstlScript {
serde_yaml_ng::to_string(&d)
.map_err(|e| anyhow::anyhow!("Failed to serialize to YAML: {}", e))?
} else {
serde_json::to_string(&d)
serde_json::to_string_pretty(&d)
.map_err(|e| anyhow::anyhow!("Failed to serialize to JSON: {}", e))?
};
let s = encode_string(encoding, &s, false)?;