adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Simplify bracket syntax #101

Closed JohnBrinkman closed 10 months ago

JohnBrinkman commented 10 months ago

The original JMESPath implementation allows:

index-expression  = expression bracket-specifier / bracket-specifier
bracket-specifier = "[" (number / "*") "]" / "[]"

Implied is that index expressions are for arrays only. We originally thought it would be useful to allow:

In hindsight, none of these are particularly useful, and we are better off simplifying the grammar by removing them.