aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/encoding/json/decode.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-01-30 01:37:13 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-01-30 01:37:13 +0000
commit777133fefb9704c957884216e44bf7ba25ca2fae (patch)
treeac10866a1e77c784cb9d48b872fd8013ba124fd0 /libgo/go/encoding/json/decode.go
parent900f0840363c7a110723b18024b361f22b8892b9 (diff)
downloadgcc-777133fefb9704c957884216e44bf7ba25ca2fae.zip
gcc-777133fefb9704c957884216e44bf7ba25ca2fae.tar.gz
gcc-777133fefb9704c957884216e44bf7ba25ca2fae.tar.bz2
libgo: Update Go library to master revision 15502/229081515358.
From-SVN: r195569
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 6e6815f..95e9120 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.