• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

h2non / jsonpath-ng / 74
0%

Build:
DEFAULT BRANCH: master
Ran 28 Mar 2021 12:20PM UTC
Jobs 5
Files 0
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
74

Pull #74

travis-ci

Johannes Wienke
Allow filtering dictionaries using entry keys

Before this commit, it was not possible to filter on the value of
object entries based on their keys such as in the following example

Given the input

```
{"foo": 42"}
```

The JSONPath `$[?(@.foo==42)]` did not produce any results and therefore
is was only possible to access top-level dictionary entries, but not to
produce or not to produce a result at all based on the value of such a
top-level entry.

This commit implements this feature while trying to keep up all other
working path expressions known from the test cases.

Interestingly, one test case specifically tried to prevent these
semantics (at a deeper level of the document structure). This case had
to be removed to make the test suite pass again. I could not find the
underlying issue number 2 to find out why this test case existed as that
issue seems to stem from a parent of this fork from long ago. Maybe, a
resulting release should therefore receive a major version bump as this
might be understood as a breaking change.

In general, the specification is pretty lose on how square brackets and
filter expression are to be understood in the case of dictionaries, not
lists. The implementations here follows the already existing practical
approach that simply makes more expressions and intended use cases
working. However, this results in multiple paths being valid to access
the same objects and therefore a ambiguity is created.

Fixes #66
Pull Request #74:

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 74.1 28 Mar 2021 12:20PM UTC 0
0.0
Travis Job 74.1
2 74.2 28 Mar 2021 12:20PM UTC 0
0.0
Travis Job 74.2
3 74.3 28 Mar 2021 12:20PM UTC 0
0.0
Travis Job 74.3
4 74.4 28 Mar 2021 12:20PM UTC 0
0.0
Travis Job 74.4
5 74.5 28 Mar 2021 12:21PM UTC 0
0.0
Travis Job 74.5
Source Files on build 74
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #74
  • Pull Request #74
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc