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

Give an option to reformat straight json comparisons to per-field jsonpath ones #3673

Open
3 tasks
lu-zero opened this issue Jan 29, 2025 · 0 comments
Open
3 tasks
Labels
enhancement New feature or request

Comments

@lu-zero
Copy link

lu-zero commented Jan 29, 2025

Problem to solve

Sometimes novices might just paste the dump of json expected and then suffer since hurl failure reporting for it doesn't tell what.

Proposal

Have hurlfmt take the json and convert it on a set jsonpath asserts, one per flattened json field.

Additional context and resources

It is something that can be done using creatively jq, but would be better to have it builtin.

Tasks to complete

  • Implement the json object flattening logic ( nested-object to array of single field objects of dot.and[].flattened.keys keys and value)
  • Produce the jsonpath assertions going over the the array
  • Add the option to the hurlfmt cli
@lu-zero lu-zero added the enhancement New feature or request label Jan 29, 2025
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

No branches or pull requests

1 participant