diff --git a/core/redison_handler.go b/core/redison_handler.go index dc96355..beadec0 100644 --- a/core/redison_handler.go +++ b/core/redison_handler.go @@ -65,7 +65,7 @@ func (rh *RedisonHandler) JSONMSet(key string, kv map[string]any) error { if err != nil { return err } - pl.Do(rh.ctx, "JSON.SET", key, path, fmt.Sprintf("'%s'", string(b))) + pl.Do(rh.ctx, "JSON.SET", key, path, b) } cmders, err := pl.Exec(rh.ctx) @@ -91,7 +91,7 @@ func (rh *RedisonHandler) JSONSet(key, path string, obj any, opts ...SetOption) "JSON.SET", key, path, - fmt.Sprintf("'%s'", string(b)), + b, } if len(opts) > 0 { args = append(args, opts[0]) @@ -266,7 +266,7 @@ func appendValues(args []any, values ...any) []any { args = append(args, jsonValue) default: bt, _ := json.Marshal(jsonValue) - args = append(args, fmt.Sprintf("'%s'", string(bt))) + args = append(args, bt) } } return args