summaryrefslogtreecommitdiff
path: root/src/pkg/json/encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/encode.go')
-rw-r--r--src/pkg/json/encode.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/json/encode.go b/src/pkg/json/encode.go
index dfa3c59da..ec0a14a6a 100644
--- a/src/pkg/json/encode.go
+++ b/src/pkg/json/encode.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// The json package implements encoding and decoding of JSON objects as
-// defined in RFC 4627.
+// Package json implements encoding and decoding of JSON objects as defined in
+// RFC 4627.
package json
import (
@@ -172,7 +172,7 @@ func (e *encodeState) marshal(v interface{}) (err os.Error) {
err = r.(os.Error)
}
}()
- e.reflectValue(reflect.NewValue(v))
+ e.reflectValue(reflect.ValueOf(v))
return nil
}
@@ -180,7 +180,7 @@ func (e *encodeState) error(err os.Error) {
panic(err)
}
-var byteSliceType = reflect.Typeof([]byte(nil))
+var byteSliceType = reflect.TypeOf([]byte(nil))
func (e *encodeState) reflectValue(v reflect.Value) {
if !v.IsValid() {