Fix UnmarshalJSON for RawMessage type

This commit is contained in:
Masaaki Goshima 2021-01-30 01:47:31 +09:00
parent 84c8b84671
commit 0059153b07
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ func (m *RawMessage) UnmarshalJSON(data []byte) error {
if m == nil { if m == nil {
return errors.New("json.RawMessage: UnmarshalJSON on nil pointer") return errors.New("json.RawMessage: UnmarshalJSON on nil pointer")
} }
*m = append((*m)[0:0], data...) *m = data
return nil return nil
} }