jsonpath icon indicating copy to clipboard operation
jsonpath copied to clipboard

Parser should throw an error on surplus text following the closing angle bracket of an array index

Open oshadmi opened this issue 4 years ago • 0 comments

Path such as $.store.book[0]category Does not throw an error and is silently ignoring the surplus text category beyond the ] And is parsed as $.store.book[0]

Can be demonstrated also on https://freestrings.github.io/jsonpath/ The same value is returned with and without the surplus text category. Parser should throw an error on surplus text.

Notice that If there is a dot delimiter before the surplus text then everything is OK, e.g., $.store.book[0].category is working as expeced.

oshadmi avatar Jan 27 '22 07:01 oshadmi