summaryrefslogtreecommitdiff
path: root/libgo/go/encoding/json/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/encoding/json/decode.go')
-rw-r--r--libgo/go/encoding/json/decode.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/libgo/go/encoding/json/decode.go b/libgo/go/encoding/json/decode.go
index 6e6815ff131..95e91209184 100644
--- a/libgo/go/encoding/json/decode.go
+++ b/libgo/go/encoding/json/decode.go
@@ -52,25 +52,6 @@ import (
// an UnmarshalTypeError describing the earliest such error.
//
func Unmarshal(data []byte, v interface{}) error {
-
- // skip heavy processing for primitive values
- var first byte
- var i int
- for i, first = range data {
- if !isSpace(rune(first)) {
- break
- }
- }
- if first != '{' && first != '[' {
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr || rv.IsNil() {
- return &InvalidUnmarshalError{reflect.TypeOf(v)}
- }
- var d decodeState
- d.literalStore(data[i:], rv.Elem(), false)
- return d.savedError
- }
-
d := new(decodeState).init(data)
// Quick check for well-formedness.