From b9c4d8b21bbe47733f3bc061973743de06ce3b64 Mon Sep 17 00:00:00 2001 From: mountain Date: Sun, 16 Jul 2023 17:15:08 +0900 Subject: [PATCH] =?UTF-8?q?objvalue=20marshalling=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/redison_handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/redison_handler.go b/core/redison_handler.go index 996f450..65fa931 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, b) + pl.Do(rh.ctx, "JSON.SET", key, path, fmt.Sprintf("'%s'", string(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, - b, + fmt.Sprintf("'%s'", string(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, bt) + args = append(args, fmt.Sprintf("'%s'", string(bt))) } } return args