mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
Set TimeNotBuiltin msgpack option directly without using BasicHandle
Prevents a situation where when attempting to decode a string into a nil interface, the decoded value would be the encoded slice of bytes instead of the string we need.
This commit is contained in:
committed by
Dan Christian Bogos
parent
df3ae97e57
commit
628df25caa
@@ -265,9 +265,7 @@ func NewCodecMsgpackMarshaler() *CodecMsgpackMarshaler {
|
||||
mh := new(codec.MsgpackHandle)
|
||||
mh.MapType = reflect.TypeOf(map[string]any(nil))
|
||||
mh.RawToString = true
|
||||
mh.BasicHandle = codec.BasicHandle{
|
||||
TimeNotBuiltin: true,
|
||||
}
|
||||
mh.TimeNotBuiltin = true
|
||||
return &CodecMsgpackMarshaler{mh}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user