From d501ddad333be57dcc3a7e2beea73ee118b77ec3 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sun, 28 Sep 2025 00:47:25 +0200 Subject: [PATCH] fix empty strings Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- leak-utils/misc/json.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/leak-utils/misc/json.go b/leak-utils/misc/json.go index 0c0b03e..11df0a9 100644 --- a/leak-utils/misc/json.go +++ b/leak-utils/misc/json.go @@ -40,7 +40,11 @@ func flattenJSON(prefix string, in map[string]any, out map[string]any) { } } default: - out[key] = fmt.Sprintf("%v", child) + if child == nil { + out[key] = "" + } else { + out[key] = fmt.Sprintf("%v", child) + } } } }