]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] encoding/json: documentation fix
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Jun 2012 20:24:13 +0000 (16:24 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Jun 2012 20:24:13 +0000 (16:24 -0400)
««« backport 258d7ab64d9a
encoding/json: documentation fix

Fixes #3650

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6238046

»»»

src/pkg/encoding/json/encode.go

index 842672c3974509e2c70e0624ac3a268c0d2b6584..b6e1cb16e5a471b198d6c620badfbbaf464dd23a 100644 (file)
@@ -96,7 +96,7 @@ import (
 //
 // 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
@@ -157,6 +157,8 @@ type Marshaler interface {
        MarshalJSON() ([]byte, error)
 }
 
+// An UnsupportedTypeError is returned by Marshal when attempting
+// to encode an unsupported value type.
 type UnsupportedTypeError struct {
        Type reflect.Type
 }