fix: abnormal indent in summary.json

This commit is contained in:
lilong.129
2025-06-07 20:45:35 +08:00
parent e75edf8400
commit fcf3009c67
2 changed files with 3 additions and 3 deletions

View File

@@ -41,9 +41,9 @@ func Dump2JSON(data interface{}, path string) error {
}
log.Info().Str("path", path).Msg("dump data to json")
// init json encoder
// Use standard library json encoder with consistent indentation and no HTML escaping
buffer := new(bytes.Buffer)
encoder := json.NewEncoder(buffer)
encoder := builtinJSON.NewEncoder(buffer)
encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ")

View File

@@ -1 +1 @@
v5.0.0-beta-2506071652
v5.0.0-beta-2506072045