Ticket #5554 (closed defect: fixed)

Opened 11 months ago

Last modified 9 months ago

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

Reported by: kriszyp Owned by: kriszyp
Priority: normal Milestone: 1.1
Component: General Version: 1.0
Severity: normal Keywords: JsonPath
Cc:

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

query.js (5.0 kB) - added by kriszyp 11 months ago.
Updated query.js for dojox.jsonPath
jsonPath.js (8.2 kB) - added by kriszyp 11 months ago.

Change History

Changed 11 months ago by kriszyp

  • status changed from new to assigned

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.

Changed 11 months ago by kriszyp

  • status changed from assigned to closed
  • resolution set to fixed

Changed 11 months ago by kriszyp

  • status changed from closed to reopened
  • resolution deleted

Changed 11 months ago by kriszyp

Updated query.js for dojox.jsonPath

Changed 11 months ago by kriszyp

Changed 9 months ago by dmachi

  • status changed from reopened to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.