summaryrefslogtreecommitdiff
path: root/src/encoding/json/stream.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/stream.go')
-rw-r--r--src/encoding/json/stream.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/encoding/json/stream.go b/src/encoding/json/stream.go
index b740d32a7d..422837bb63 100644
--- a/src/encoding/json/stream.go
+++ b/src/encoding/json/stream.go
@@ -10,7 +10,7 @@ import (
"io"
)
-// A Decoder reads and decodes JSON objects from an input stream.
+// A Decoder reads and decodes JSON values from an input stream.
type Decoder struct {
r io.Reader
buf []byte
@@ -164,7 +164,7 @@ func nonSpace(b []byte) bool {
return false
}
-// An Encoder writes JSON objects to an output stream.
+// An Encoder writes JSON values to an output stream.
type Encoder struct {
w io.Writer
err error
@@ -218,14 +218,14 @@ func (enc *Encoder) Encode(v interface{}) error {
return err
}
-// Indent sets the encoder to format each encoded object with Indent.
+// Indent sets the encoder to format each encoded value with Indent.
func (enc *Encoder) Indent(prefix, indent string) {
enc.indentBuf = new(bytes.Buffer)
enc.indentPrefix = prefix
enc.indentValue = indent
}
-// RawMessage is a raw encoded JSON object.
+// RawMessage is a raw encoded JSON value.
// It implements Marshaler and Unmarshaler and can
// be used to delay JSON decoding or precompute a JSON encoding.
type RawMessage []byte