mirror of https://github.com/goccy/go-json.git
Fix UnmarshalJSON for RawMessage type
This commit is contained in:
parent
84c8b84671
commit
0059153b07
2
json.go
2
json.go
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue