Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#5556 closed enhancement (fixed)

Add result-based evaluation support to dojox.jsonPath

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


Currently dojox.jsonPath uses item-based evaluation as specified by Stefan Goesnner's original library. However, an alternate evaluation approach, result-based evaluation, is a valuable way to perform jsonpath queries. Result-based evaluation behaves much more like JavaScript? when using standard JS operators. For example: query({a:4},"$.a") will return [4] with item based evaluation, but will return 4 with result based evaluation. Result-based evaluation does not affect the syntax of JsonPath? at all. Result-based evaluation also allows for a greater range of capabilities, like applying the slice operator to limit the return values on a expression-based query. Currently, item-based evaluation is the default evaluation for dojox.jsonPath, in order to be compatible with Stefan's library, however I believe result-based evaluation is a much more sane and useful evaluation technique for jsonpath, and I would like to recommend that it be the default evaluation for dojox.jsonPath. Would that be allright or should we stick with item-based as default?

Change History (4)

comment:1 Changed 14 years ago by kriszyp

Resolution: fixed
Status: newclosed

This enhancement (and unit test) is included in the attachment for ticket #5554.

comment:2 Changed 14 years ago by kriszyp

Resolution: fixed
Status: closedreopened

comment:3 Changed 14 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:4 Changed 12 years ago by bill

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