aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/encode.go')
-rw-r--r--src/encoding/json/encode.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go
index 383460e52b..464ee3ece4 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -270,6 +270,8 @@ func (e *MarshalerError) Error() string {
return "json: error calling MarshalJSON for type " + e.Type.String() + ": " + e.Err.Error()
}
+func (e *MarshalerError) Unwrap() error { return e.Err }
+
var hex = "0123456789abcdef"
// An encodeState encodes JSON into a bytes.Buffer.