Update jsonextract.go (#2287)

Return nil instead of empty string as ParseKV does the same
This commit is contained in:
Laurence Jones 2023-06-16 18:34:55 +01:00 committed by GitHub
parent 381220daf4
commit 2c8769adf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}