jsonparser icon indicating copy to clipboard operation
jsonparser copied to clipboard

ArrayEach correct behaviour

Open salmonix opened this issue 2 years ago • 1 comments

Thanks for the great lib, first of all. The documentation for ArrayEach says:

// ArrayEach is used when iterating arrays, accepts a callback function with the same return arguments as `Get`.

However, at line 1042 the callback function is called this way:

		if t != NotExist {
			cb(v, t, offset+o-len(v), e)
		}

It seems that there is no return value checked from the callback function - or I overlooked something. Could you confirm it? I hit the issue because I do some conversion in the callback function and in case it returns err I want to stop executing the rest.

salmonix avatar Apr 07 '23 16:04 salmonix