//
// Channel, complex, and function values cannot be encoded in JSON.
// Attempting to encode such a value causes Marshal to return
-// an InvalidTypeError.
+// an UnsupportedTypeError.
//
// JSON cannot represent cyclic data structures and Marshal does not
// handle them. Passing cyclic structures to Marshal will result in
MarshalJSON() ([]byte, error)
}
+// An UnsupportedTypeError is returned by Marshal when attempting
+// to encode an unsupported value type.
type UnsupportedTypeError struct {
Type reflect.Type
}