From 2c8769adf6151113417ecc7851942451354134da Mon Sep 17 00:00:00 2001 From: Laurence Jones Date: Fri, 16 Jun 2023 18:34:55 +0100 Subject: [PATCH] Update jsonextract.go (#2287) Return nil instead of empty string as ParseKV does the same --- pkg/exprhelpers/jsonextract.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/exprhelpers/jsonextract.go b/pkg/exprhelpers/jsonextract.go index a874122ff..a616588a7 100644 --- a/pkg/exprhelpers/jsonextract.go +++ b/pkg/exprhelpers/jsonextract.go @@ -175,8 +175,8 @@ func UnmarshalJSON(params ...any) (any, error) { err := json.Unmarshal([]byte(jsonBlob), &out) if err != nil { log.Errorf("UnmarshalJSON : %s", err) - return "", err + return nil, err } target[key] = out - return "", nil + return nil, nil }