From 0059153b0783244861531626beec70b0e66569b4 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Sat, 30 Jan 2021 01:47:31 +0900 Subject: [PATCH] Fix UnmarshalJSON for RawMessage type --- json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json.go b/json.go index 47b09fc..f3a3f3a 100644 --- a/json.go +++ b/json.go @@ -370,7 +370,7 @@ func (m *RawMessage) UnmarshalJSON(data []byte) error { if m == nil { return errors.New("json.RawMessage: UnmarshalJSON on nil pointer") } - *m = append((*m)[0:0], data...) + *m = data return nil }