diff options
Diffstat (limited to 'src/pkg/json/decode.go')
| -rw-r--r-- | src/pkg/json/decode.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/pkg/json/decode.go b/src/pkg/json/decode.go index 35a06b0f9..7d474fa7b 100644 --- a/src/pkg/json/decode.go +++ b/src/pkg/json/decode.go @@ -8,7 +8,6 @@ package json import ( - "container/vector" "encoding/base64" "os" "reflect" @@ -71,7 +70,6 @@ type Unmarshaler interface { UnmarshalJSON([]byte) os.Error } - // An UnmarshalTypeError describes a JSON value that was // not appropriate for a value of a specific Go type. type UnmarshalTypeError struct { @@ -670,7 +668,7 @@ func (d *decodeState) valueInterface() interface{} { // arrayInterface is like array but returns []interface{}. func (d *decodeState) arrayInterface() []interface{} { - var v vector.Vector + var v []interface{} for { // Look ahead for ] - can only happen on first iteration. op := d.scanWhile(scanSkipSpace) @@ -682,7 +680,7 @@ func (d *decodeState) arrayInterface() []interface{} { d.off-- d.scan.undo(op) - v.Push(d.valueInterface()) + v = append(v, d.valueInterface()) // Next token must be , or ]. op = d.scanWhile(scanSkipSpace) @@ -742,7 +740,6 @@ func (d *decodeState) objectInterface() map[string]interface{} { return m } - // literalInterface is like literal but returns an interface value. func (d *decodeState) literalInterface() interface{} { // All bytes inside literal return scanContinue op code. |
