jsonpath 0.1.1

JSONPath for Rust
Documentation
dollar = { "$" }
arobase = { "@" }
asterisk = _{ "*" }
dot =  _{ "." }
double_dot =  _{ ".." }

alpha = _{ 'a'..'z' | 'A'..'Z' }
digit = _{ '0'..'9' }
special_charaters = _{ "_" | "-" }
ident = { (alpha | digit | special_charaters)+ }
number = { digit+ }
float = { digit+ ~ "." ~ digit+ }

child = { dot ~ ident }
any_child = { dot ~ asterisk }
indexed_child = { "[" ~ number ~ "]" }
slice = { "[" ~ number ~ ":" ~ number ~ "]" }
slice_to = { "[:" ~ number ~ "]" }
slice_from = { "[" ~ number ~ ":]" }

equal = { "==" }
different = { "!=" }
greater = { ">" }
lower = { "<" }
condition = { equal | different | greater | lower }
string = { (alpha | digit | special_charaters | " ")+ }
literal = { "'" ~ string ~ "'" }

filter = { "[?(" ~ (dollar | arobase) ~ (child | any_child | indexed_child | slice | slice_to | slice_from | filter)* ~ (" ")* ~ (condition) ~ (" ")* ~ ( float | number | literal) ~ ")]" }

expression = { dollar ~ (child | any_child | indexed_child | slice | slice_to | slice_from | filter)* ~ eoi }