[Feature Request] Add support for JMESPath
See original GitHub issueBuilding a Selector based on JMESPath in parsel will help ease parsing Json.
This will also help scrapy to add methods like add_json
and get_json
to the ItemLoader
. I got this idea from scrapy/scrapy#1005.
From what I understand, the Selector
in parsel has been built using lxml, how about using jmespath for building a JsonSelector
?
I am not sure if this is the feature to have in this library as Parsel
describes itself as a parser for XML/HTML. But adding this feature will add great value to this project.
PS: If the maintainers would like to have this feature in, Than I’d like to contribute to it myself.
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (15 by maintainers)
Top Results From Across the Web
Conditional Transformer with support for JMESPATH - Alumio
Hi, In most cases 'string' fields (like in Value Setter) support JMESPATH. But a Conditional Transformer ... Discussions Alumio Forums Feature Requests ......
Read more >Git Integration for Jira Data Center - Confluence - Atlassian
Pull/merge requests created via the git integration developer panel in the Jira issue will automatically add a link to the Jira issue where...
Read more >GitLab JMESPath Filter Examples | Git Integration for Jira Self ...
An optional JMESPath filter can be configured when adding GitLab integration or repositories. 1. Contains (include). [?contains(name, 'git') | contains(name ...
Read more >Filter for Specific Fields (JMESPath) [2022] | API Connector
To view the raw JSON, set up and save your request, and then click Output options > More options > JMESPath > View...
Read more >JMESPath - Kyverno
JMESPath expressions in most places in Kyverno must be enclosed in double curly braces like {{request.namespace}} . If an expression is used as ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not to derail this but I’d argue that implementing
JSONpath
[1] would actually be more fitting for parsel as it isxpath
like. For example Jmespath doesn’t support recursive queries (like//node
xpath) while Jsonpath does (as$..node
); also the whole protocol structure is much more similar to that ofxpath
.Ideally it would be great to have both! More and more web is using json and would be great to have one good parser for both html and json.
1 - https://github.com/h2non/jsonpath-ng jsonpath implementation in Python
How is going this? I’m trying to implement this myself over parsel selector in my own project but I’m sure you know how to do it better.