Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#5554 closed defect (fixed)

dojox.jsonPath can't handle special characters in object keys or in query

Reported by: kriszyp Owned by: Kris Zyp
Priority: high Milestone: 1.1
Component: General Version: 1.0
Keywords: JsonPath Cc:
Blocked By: Blocking:

Description

The presence of "@",";","." in the properties of objects that are being processed or in strings within a JsonPath? query causes erroneous results. The original JsonPath? code relied on strings to hold path segments, which resulted in avoidable character collisions.

Attachments (2)

query.js (5.0 KB) - added by kriszyp 12 years ago.
Updated query.js for dojox.jsonPath
jsonPath.js (8.2 KB) - added by kriszyp 12 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by kriszyp

Status: newassigned

Attached is the fix for this defect. Note, that the prior version of dojox.jsonPath had all the regular expressions moved into a separate object. This was a fairly large overhaul of jsonpath and I worked on the original jsonPath.js code from Stefan Goesnner, so I could submit my fix to him as well. Because of this, I just copied the updated jsonpath.js code into dojo's query.js, and I have not separated out the regular expressions like they were before yet. However I don't believe that the processing performance benefit of having the regular expressions in a static object is worth the extra size that this incurs. I would recommend not moving them out. However, if you would like me to move the regular expressions out to a static object again, I certainly would be willing to do so.

comment:2 Changed 12 years ago by kriszyp

Resolution: fixed
Status: assignedclosed

comment:3 Changed 12 years ago by kriszyp

Resolution: fixed
Status: closedreopened

Changed 12 years ago by kriszyp

Attachment: query.js added

Updated query.js for dojox.jsonPath

Changed 12 years ago by kriszyp

Attachment: jsonPath.js added

comment:4 Changed 12 years ago by Dustin Machi

Resolution: fixed
Status: reopenedclosed

(In [12658]) updates and fixes for jsonPath from Kris (CLA on file). fixes #5554 and #5556

comment:5 Changed 10 years ago by bill

Owner: changed from kriszyp to Kris Zyp
Note: See TracTickets for help on using tickets.