Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support for XPATH #292

Closed
maxlerebourg opened this issue Jul 18, 2023 · 2 comments · Fixed by #294
Closed

feat: Support for XPATH #292

maxlerebourg opened this issue Jul 18, 2023 · 2 comments · Fixed by #294
Labels
enhancement New feature or request

Comments

@maxlerebourg
Copy link

maxlerebourg commented Jul 18, 2023

Is your feature request related to a problem? Please describe it.
When I retrieve deployed_version which responds:

{ "bar" : [ { "version" : "0.0.1" } ] }

with parameter json = "bar[0].version" || "bar.0.version" || "bar._0.version".
This does not work as expected, the array cannot be explored.
The functionality I'm looking for is the implementation of a solution to easily crawl json.

Describe the solution you want
I've started trying to rewrite your implementation of json usage, without success.
And as I come from js/ts development, I thought of the xpath equivalent for golang and found go xpath implementation that you can use for html, json and/or xml.

Additional context
Maybe you'll need a new parameter for deployed_release: xpath, so as not to break the old behavior of deployed_release: json.

@JosephKav
Copy link
Collaborator

JosephKav commented Jul 19, 2023

👋, I have a PR (#294) that will add support for arrays in the JSON, e.g. bar[0].version. I don't see a worthwhile benefit to xPath currently, so would rather this than use a package that could drop in support

@maxlerebourg
Copy link
Author

That's perfect, thanks a lot. I hope it will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants