-
Currently, hurl supports capturing responses by transforming them with jsonpath expressions. It would be nice if hurl could additionally support jq filters. jq provides much more powerful transformations and its syntax is well known among developers. jaq is a rust implementation of the jq language, and could be integrated into hurl relatively easily. I would like to work on this, if this feature would be desired by the project |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @baod-rate Thanks for the idea. After discussion, whereas it can be useful, we're not going to include it:
That said, I confess don't know all the powers of jq. Do you have examples of what is difficult to do with our actual |
Beta Was this translation helpful? Give feedback.
-
One possible use case that is easy with jq is to aggregate values for a later use. Let me put an example, let's say we do a first request that returns a list of
This first endpoint would return something like: {"instruments":[{"name":"TRY_JPY"},{"name":"USD_GBP"}]} The
And the second request we want to do is:
Which... gives an error because it's a collection instead of an string. We could solve this particular case by adding a I see the point on bringing many dependencies into the project — maybe you can consider assert/captures/filters using plain shell commands? |
Beta Was this translation helpful? Give feedback.
Hi @baod-rate
Thanks for the idea. After discussion, whereas it can be useful, we're not going to include it: