Skip to content

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

@oshadmi

Description

@oshadmi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions