badges / badges/shields

Regression: query not supported

Open
#10,594 9 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

### Are you experiencing an issue with...

shields.io

### 🐞 Description

```
https://img.shields.io/badge/dynamic/json?color=c51a4a&label=Pi-Apps&prefix=Prism%20Launcher%20&query=%24..%5B%3F%28%40.Name%3D%3D%22Minecraft%20Java%20Prism%20Launcher%22%29%5D.Version&url=https%3A%2F%2Fraw.githubusercontent.com%2FBotspot%2Fpi-apps-analytics%2Fmain%2Fpackage_data.json
```
which is decoded as
```
https://img.shields.io/badge/dynamic/json?color=c51a4a&label=Pi-Apps&prefix=Prism Launcher &query=$..[?(@.Name=="Minecraft Java Prism Launcher")].Version&url=https://raw.githubusercontent.com/Botspot/pi-apps-analytics/main/package_data.json
```
the above query was previously supported for over a year but stopped working sometime recently (in the past few months)

its purpose was to query https://raw.githubusercontent.com/Botspot/pi-apps-analytics/main/package_data.json for a `Name` with `Minecraft Java Prism Launcher` and return the corresponding `Version` string in the json.

The above query continues to work in https://jsonpath.com/ so this is a regression in shields or the JSONPath evaluator is uses.

### 🔗 Link to the badge

![Badge](https://img.shields.io/badge/dynamic/json?color=c51a4a&label=Pi-Apps&prefix=Prism%20Launcher%20&query=%24..%5B%3F%28%40.Name%3D%3D%22Minecraft%20Java%20Prism%20Launcher%22%29%5D.Version&url=https%3A%2F%2Fraw.githubusercontent.com%2FBotspot%2Fpi-apps-analytics%2Fmain%2Fpackage_data.json)

### 💡 Possible Solution

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the provided shields.io dynamic/json badge URL and inspect the JSONPath evaluator used by that endpoint. Compare its result with jsonpath.com; done means the query finds the entry named "Minecraft Java Prism Launcher" and returns its Version string again.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.