- Dev testing: Rename test file
- Fix: Fixing support for sandbox in the case of functions
- Feature: Use
thisif present for global export - Docs: Clarify function signature
- Docs: Update testing section
- Dev testing: Add in missing test for browser testing
- Dev testing: Add remark linting to testing process (#70)
- Dev testing: Lint JS test support files
- Dev testing: Split out tests into
eslint,remark,lint,nodeunit - Dev testing: Remove need for nodeunit build step
- Dev testing: Simplify nodeunit usage and make available
as
npm run browser-test
- Add
@scalar()type operator (in JavaScript mode, will also include)
- Avoid double-encoding path in results
- Breaking change (from version 0.11): Silently strip
~and^operators and type operators such as@string()inJSONPath.toPathString()calls. - Breaking change: Remove
Array.isArraypolyfill as no longer supporting IE <= 8 - Feature: Allow omission of options first argument to
JSONPath - Feature: Add
JSONPath.toPointer()and "pointer"resultTypeoption. - Fix: Correctly support
callbackandotherTypeCallbackas numbered arguments toJSONPath. - Fix: Enhance Node checking to avoid issue reported with angular-mock
- Fix: Allow for
@or other special characters in at-sign-prefixed property names (by use of[?(@['...'])]or[(@['...'])]).
- Breaking change: Problems with upper-case letters in npm is causing us to rename the package, so have renamed package to "jsonpath-plus" (there are already package with lower-case "jsonpath" or "json-path"). The new name also reflects that there have been changes to the original spec.
- Actually add the warning in the README that problems in npm with upper-case letters is causing us to rename to "jsonpath-plus" (next version will actually apply the change).
- Give warning in README that problems in npm with upper-case letters is causing us to rename to "jsonpath-plus" (next version will actually apply the change).
- Breaking change: For unwrapped results, return
undefinedinstead offalseupon failure to find path (to allow distinguishing ofundefined--a non-allowed JSON value--from the valid JSON values,nullorfalse) and return the exact value upon falsy single results (in order to allow return ofnull) - Deprecated: Use of
jsonPath.eval(); use new class-based API instead - Feature: AMD export
- Feature: By using
selfinstead ofwindowexport, allow JSONPath to be trivially imported into web workers, without breaking compatibility in normal scenarios. See MDN on self - Feature: Offer new class-based API and object-based arguments (with
option to run new queries via
evaluate()method without resupplying config) - Feature: Allow new
preventEval=trueandautostart=falseoption - Feature: Allow new callback option to allow a callback function to execute as each final result node is obtained
- Feature: Allow type operators: JavaScript types (
@boolean(),@number(),@string()), other fundamental JavaScript types (@null(),@object(),@array()), the JSONSchema-added type,@integer(), and the following non-JSON types that can nevertheless be used with JSONPath when querying non-JSON JavaScript objects (@undefined(),@function(),@nonFinite()). Finally,@other()is made available in conjunction with a new callback option,otherTypeCallback, can be used to allow user-defined type detection (at least until JSON Schema awareness may be provided). - Feature: Support "parent" and "parentProperty" for resultType along with "all" (which also includes "path" and "value" together)
- Feature: Support custom
@parent,@parentProperty,@property(in addition to custom property@path) inside evaluations - Feature: Support a custom operator (
~) to allow grabbing of property names - Feature: Support
$for retrieval of root, and document this as well as$..behavior - Feature: Expose cache on
JSONPath.cachefor those who wish to preserve and reuse it - Feature: Expose class methods
toPathStringfor converting a path as array into a (normalized) path as string andtoPathArrayfor the reverse (though accepting unnormalized strings as well as normalized) - Fix: Allow
^as property name - Fix: Support
.within properties - Fix:
@pathin index/property evaluations
- Support for parent selection via
^ - Access current path via
@pathin test statements - Allowing for multi-statement evals
- Performance improvements
- Support a sandbox arg to eval
- Use vm.runInNewContext in place of eval