Commit 83771afe authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

encoding/json: documentation fix

Fixes #3650

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6238046
parent 1f46cb0b
...@@ -96,7 +96,7 @@ import ( ...@@ -96,7 +96,7 @@ import (
// //
// Channel, complex, and function values cannot be encoded in JSON. // Channel, complex, and function values cannot be encoded in JSON.
// Attempting to encode such a value causes Marshal to return // Attempting to encode such a value causes Marshal to return
// an InvalidTypeError. // an UnsupportedTypeError.
// //
// JSON cannot represent cyclic data structures and Marshal does not // JSON cannot represent cyclic data structures and Marshal does not
// handle them. Passing cyclic structures to Marshal will result in // handle them. Passing cyclic structures to Marshal will result in
...@@ -157,6 +157,8 @@ type Marshaler interface { ...@@ -157,6 +157,8 @@ type Marshaler interface {
MarshalJSON() ([]byte, error) MarshalJSON() ([]byte, error)
} }
// An UnsupportedTypeError is returned by Marshal when attempting
// to encode an unsupported value type.
type UnsupportedTypeError struct { type UnsupportedTypeError struct {
Type reflect.Type Type reflect.Type
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment