jmespath / jmespath.py

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

Minus (-) char in expression raises LexerError exception #87

Closed a-nanasov closed 9 years ago

a-nanasov commented 9 years ago

Hi, if path contains minus character, the following error raises:

jmespath.exceptions.LexerError: Bad jmespath expression: Unknown character:
statistics.destinations-voice
                       ^
jamesls commented 9 years ago

If a key name has anything besides [_a-zA-Z908], it needs to be quoted, so this should work for you:

statistics."destinations-voice"