Update jsonextract.go (#2287)
Return nil instead of empty string as ParseKV does the same
This commit is contained in:
parent
381220daf4
commit
2c8769adf6
|
@ -175,8 +175,8 @@ func UnmarshalJSON(params ...any) (any, error) {
|
||||||
err := json.Unmarshal([]byte(jsonBlob), &out)
|
err := json.Unmarshal([]byte(jsonBlob), &out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("UnmarshalJSON : %s", err)
|
log.Errorf("UnmarshalJSON : %s", err)
|
||||||
return "", err
|
return nil, err
|
||||||
}
|
}
|
||||||
target[key] = out
|
target[key] = out
|
||||||
return "", nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue