jdegoes/blueeyes — pull request #128 by noelwelsh (2013-07-25 14:59:01+00:00)
Title: Extend JPath to accept quoted string references

JPath syntax is now (roughly)

jPath := pathElement*
pathElement := id | quotedField | numericField
id := .[a-zA-Z_$][a-zA-Z_$0-9]*
quotedField := ['quotedId'] | ["quotedId"]
numericField := []

quotedId is a string with \ used as an escape character.

The first element of a jPath need not start with a . if it is an id

Example:

foo['bar bar']["black sheep"] is a valid reference into

{"foo": {"bar bar": {"black sheep": "aValue"}}}