Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

JSONPath

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

JSONPath - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

28

CHANGES.md

@@ -0,17 +1,23 @@

## Dec 12, 2015 10:11pm
- 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).
- Version 0.11.1
## Dec 12, 2015
- Breaking change: For unwrapped results, return undefined instead of false upon failure to find path (to allow distinguishing of undefined--a non-allowed JSON value--from the valid JSON, null or false) and return the exact value upon falsy single results (in order to allow return of null)
- Breaking change: For unwrapped results, return `undefined` instead of `false` upon failure to find path (to allow distinguishing of `undefined`--a non-allowed JSON value--from the valid JSON values, `null` or `false`) and return the exact value upon falsy single results (in order to allow return of `null`)
- Deprecated: Use of `jsonPath.eval()`; use new class-based API instead
- Feature: AMD export
- 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=true and autostart=false option
- Feature: By using `self` instead of `window` export, allow JSONPath to be trivially imported into web workers, without breaking compatibility in normal scenarios. See [MDN on self](https://developer.mozilla.org/en-US/docs/Web/API/Window/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=true` and `autostart=false` option
- 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: 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.cache for those who wish to preserve and reuse it
- 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.cache` for those who wish to preserve and reuse it
- Feature: Expose class methods `toPathString` for converting a path as array into a (normalized) path as string and `toPathArray` for the reverse (though accepting unnormalized strings as well as normalized)
- Fix: Allow "^" as property name
- Fix: Support "." within properties
- Fix: @path in index/property evaluations
- Fix: Allow `^` as property name
- Fix: Support `.` within properties
- Fix: `@path` in index/property evaluations
- Version 0.11

@@ -18,0 +24,0 @@

@@ -28,3 +28,3 @@ {

"license": "MIT",
"version": "0.11.0",
"version": "0.11.1",
"repository": {

@@ -31,0 +31,0 @@ "type": "git",

@@ -1,2 +0,2 @@

# JSONPath [![build status](https://secure.travis-ci.org/s3u/JSONPath.png)](http://travis-ci.org/s3u/JSONPath)
# JSONPath Plus [![build status](https://secure.travis-ci.org/s3u/JSONPath.png)](http://travis-ci.org/s3u/JSONPath)

@@ -6,5 +6,5 @@ Analyse, transform, and selectively extract data from JSON documents (and JavaScript objects).

# Install
npm install JSONPath
npm install jsonpath-plus
# Usage

@@ -17,3 +17,3 @@

```js
var JSONPath = require('JSONPath');
var JSONPath = require('jsonpath-plus');
JSONPath({json: obj, path: path, callback: callback});

@@ -207,4 +207,4 @@ ```

parent-and-parentProperty objects up to root)
1. Fix in JSONPath to avoid need for "$"?
1. Define any allowed behaviors for: '$.', '$[0]', $.[0], or $.['prop']
1. Fix in JSONPath to avoid need for `$`?
1. Define any allowed behaviors for: `$.`, `$[0]`, `$.[0]`, or `$.['prop']`
1. Modularize operator detection and usage to allow for

@@ -211,0 +211,0 @@ extensibility (at least non-standard ones)?

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc