Yaak Logo
Yaak
Feedback/"Reformat contents" removes whitespace from JSONPath Query

"Reformat contents" removes whitespace from JSONPath Query

Ben Y·Apr 7, 2025 00:09:10 UTC·YK-427
ReleasedBug

When using the "Reformat contents" feature with request chaining via response.body.path(...), all whitespaces within JSONPath queries are incorrectly stripped.

Steps to reproduce

  1. Make a GET request to https://api.github.com/users/octocat/repos

  2. Create a new request with some sort of body (e.g., JSON, GraphQL)

  3. In the new query, reference the response body of the GET request from #1 using request chaining (i.e., response.body.path(…)) with this JSONPath query: $[?(@.license?.name=="MIT License")].id

  4. Apply "Reformat contents" feature

  5. Click the blue template tag and notice that the JSONPath query has been updated to $[?(@.license?.name=="MITLicense")].id (whitespace removed between “MIT” and “License”)

Mac2025.1.2

Comments (4)

Sign in to leave a comment.

Gregory Schier

Ah yes, I think this should already be fixed in the dev branch. Going forward, any arguments of template functions will be stored base64-encoded to prevent these types of issues.

For example: ${[ my_fn(a='hello "world"') ]} will be stored as ${[ my_fn(a=b64'aGVsbG8gIndvcmxkIg==')]}

Ben YOP

Great, thanks!

Gregory Schier

https://yaak.app/blog/2025.2.0-beta.3

You will have to edit the response tag for it to update it’s arguments to be base64-encoded.

Gregory Schier
Type to search feedback...