1
0
mirror of https://github.com/golang/go synced 2024-10-03 05:11:21 -06:00

encoding/json: documentation fix

Fixes #3650

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6238046
This commit is contained in:
Brad Fitzpatrick 2012-05-23 17:18:05 -07:00
parent 1f46cb0ba2
commit 83771afe10

View File

@ -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 {
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
} }