fix empty strings

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-28 00:47:25 +02:00
parent 1ccfec3325
commit d501ddad33

View File

@@ -40,9 +40,13 @@ func flattenJSON(prefix string, in map[string]any, out map[string]any) {
} }
} }
default: default:
if child == nil {
out[key] = ""
} else {
out[key] = fmt.Sprintf("%v", child) out[key] = fmt.Sprintf("%v", child)
} }
} }
}
} }
func flattenJSONFile(inputFile string, outputFile string) error { func flattenJSONFile(inputFile string, outputFile string) error {