Skip to content

Commit 1a32809

Browse files
authored
fix error message that says "object" at .Array() (#89)
this can be confusing when you're trying to find where the error was fired.
1 parent 04d21cd commit 1a32809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parsed_json.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ func (i *Iter) Object(dst *Object) (*Object, error) {
10211021
// An optional destination can be given.
10221022
func (i *Iter) Array(dst *Array) (*Array, error) {
10231023
if i.t != TagArrayStart {
1024-
return nil, errors.New("next item is not object")
1024+
return nil, errors.New("next item is not array")
10251025
}
10261026
end := i.cur
10271027
if uint64(len(i.tape.Tape)) < end {

0 commit comments

Comments
 (0)