Gold88 / jsonpath

Automatically exported from code.google.com/p/jsonpath

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

access to element starting with @

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
==call==
jsonPath(self, '$..DIV[?(@.@class==\'value\')]').length
==input==
var arr={ "DIV": [{"@class":"value","val":5}] };

What is the expected output? What do you see instead?
Expected 1, returned 0

What version of the product are you using? On what operating system?
jsonpath-0.8.0.js
¡Javascript!

Please provide any additional information below.
The problem is about notation. In the notation, "@" has the meaning of 
actual object but an attribute starting with "@" is handled as actual 
object. I suggest to change the "@" simbol for another that is reserved in 
XML.
I suggest to visit: "http://www.w3.org/TR/xml/#NT-NameChar" for change the 
symbol.


Original issue reported on code.google.com by carellan...@gmail.com on 13 Aug 2009 at 10:57