jmespath / jmespath.py

JMESPath is a query language for JSON.
http://jmespath.org
MIT License
2.19k stars 181 forks source link

Adding root node support #17

Closed mtdowling closed 10 years ago

mtdowling commented 10 years ago

Todo: Update grammar and readme

jamesls commented 10 years ago

I'm curious about the grammar for this, would it just be:

    expression        = sub-expression / index-expression / or-expression / identifier / "*"
    expression        =/ multi-select-list / multi-select-hash / "$"

In which case things like this would be a valid expression, but would be non-sensical: "foo.$.bar"

mtdowling commented 10 years ago

Nod. Maybe it should only be allowed in a multiselect list.

On Nov 18, 2013, at 11:06 PM, James Saryerwinnie notifications@github.com wrote:

I'm curious about the grammar for this, would it just be:

expression        = sub-expression / index-expression / or-expression / identifier / "*"
expression        =/ multi-select-list / multi-select-hash / "$"

In which case things like this would be a valid expression, but would be non-sensical: "foo.$.bar"

— Reply to this email directly or view it on GitHub.

mtdowling commented 10 years ago

Updated the grammar. This JEP doesn't have any real use-case until functions and filters are added.

mtdowling commented 10 years ago

I'm going to close this for now, because I think tracking the "current node" should suffice for most use cases. We can add root node if a need arises.