OSDN Git Service

libgo: Update to Go 1.0.2 release.
[pf3gnuchains/gcc-fork.git] / libgo / go / encoding / json / encode.go
index 842672c..b6e1cb1 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
 }