We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39cb3b1 commit f547424Copy full SHA for f547424
om/conv.go
@@ -3,10 +3,9 @@ package om
3
import (
4
"encoding/json"
5
"fmt"
6
+ "github.com/redis/rueidis"
7
"reflect"
8
"strconv"
-
9
- "github.com/redis/rueidis"
10
)
11
12
func newHashConvFactory(t reflect.Type, schema schema) *hashConvFactory {
@@ -68,7 +67,7 @@ func (r hashConv) FromHash(fields map[string]string) error {
68
67
continue
69
}
70
if f.conv.StringToValue == nil {
71
- if err := json.Unmarshal(unsafe.Slice(unsafe.StringData(v), len(v)), r.entity.Field(f.idx).Addr().Interface()); err != nil {
+ if err := json.Unmarshal([]byte(v), r.entity.Field(f.idx).Addr().Interface()); err != nil {
72
return err
73
74
} else {
0 commit comments