From 049158369009ef7202afd2a292c5289444496e2e Mon Sep 17 00:00:00 2001 From: fiatjaf_ Date: Tue, 25 Feb 2025 16:51:53 -0300 Subject: [PATCH] fix error message that says "object" at `.Array()` this can be confusing when you're trying to find where the error was fired. --- parsed_json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsed_json.go b/parsed_json.go index 4828f3c..b98636c 100644 --- a/parsed_json.go +++ b/parsed_json.go @@ -1021,7 +1021,7 @@ func (i *Iter) Object(dst *Object) (*Object, error) { // An optional destination can be given. func (i *Iter) Array(dst *Array) (*Array, error) { if i.t != TagArrayStart { - return nil, errors.New("next item is not object") + return nil, errors.New("next item is not array") } end := i.cur if uint64(len(i.tape.Tape)) < end {