jmespath / jmespath.py

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

Update multiselect hash to require key names #15

Closed jamesls closed 11 years ago

jamesls commented 11 years ago

Instead of "{foo,bar}" you need to say "{foo: foo, bar: bar}". This makes it easier when you have more complicated non branched expressions, for example: "{foo: foo.bar.baz[0], first_state: states[0].name}"

This also exposed a bug in the lexer regarding double quoted identifiers and being able to escape quoted identifiers. I've added additional tests to capture this bug.

cc @garnaat @mtdowling

mtdowling commented 11 years ago

Looks good. Are you going to update the grammar in the readme too?

jamesls commented 11 years ago

Yeah, I just folded that into the docs PR, since I'm keeping a copy of the grammar in the sphinx docs: https://github.com/boto/jmespath/pull/14

garnaat commented 11 years ago

LGTM