insomnia
insomnia copied to clipboard
feat: move to jq
Motivation: jq, while being more powerful than JSONPath, nevertheless enables one to write queries that are usually as simple as, and sometimes even simpler than, the corresponding JSONPath queries.
resolves #777 resolves #3258 resolves #2342 resolves #3155
https://github.com/Kong/insomnia/assets/7845001/5e97f72b-a2ec-4d30-9497-6394d691c8c4
Considering jq
uses a downloaded executable, you might want to consider something more integrated to Javascript like JSONata
Thanks. I'll check it out. π
I think we would still use node-jq instead of using another as jq is quite popular and its simplicity as well as performance.
For this PR, I guess we should have backwards compatibility with users are using JSONPath in their collections. As we drop the JSONPath, it would ruin the chain requests where the JSONPath is used to query.
Well, I think I'll try with this approach then. Copying the node-jq lib along with the binaries and minimizing the lib source code inside insomnia. That would somehow be a better way. Love to hear the feedbacks.
@kobenguyent thanks for the pr π. Adding extra binaries makes the build process highly dependent on them (currently we use node-libcurl) and makes testing and deploying to different platforms more difficult. So we avoid adding them unless the benefits are worth it. It will be helpful if you explain the pros/cons of jq and what are your motivations/features this will support
thanks @gatzjames for looking into this. So yeah, maybe this explains better than myself https://github.com/stedolan/jq/wiki/For-JSONPath-users
IMHO, jq resolves many issues as we are currently having with JSONPath also its simplicity and performance are two pros worth mentioning π
Ping, I'm really excited about this feature and canβt wait to see it in action!
Closing as including jq in creates many issues with bundling