diff --git a/core/redison_handler.go b/core/redison_handler.go index 93c19cc..996f450 100644 --- a/core/redison_handler.go +++ b/core/redison_handler.go @@ -331,7 +331,10 @@ func (rh *RedisonHandler) JSONObjLen(key, path string) ([]int64, error) { args := []any{ "JSON.OBJLEN", key, - path, + } + + if path != "$" { + args = append(args, path) } return respToArray[int64](rh.Do(rh.ctx, args...).Result())