Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.

JMESPath Redux #203

Merged
merged 6 commits into from
Nov 22, 2017
Merged

JMESPath Redux #203

merged 6 commits into from
Nov 22, 2017

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Oct 25, 2017

The PR updates the source tests to use JMESPath instead of JSON Pointer, for lack of a better JSON query language.

This PR differs from #152 in that it doesn't roll its own shell quoting logic. Instead, @has operates on strings and regex, and @matches is introduced to match JSON values. This PR also introduces @assert, which is shorthand for matching against true.

To demonstrate why a more powerful language than JSONPointer is needed, the JSON documentation output from rustdoc is shuffled before the tests are run. This prevents any tests from relying on the order of the arrays, which is impossible with JSONPointer. We could consider doing this for all JSON produced by rustdoc, as it would prevent any frontends from relying on that behavior as well.

cc @steveklabnik @mgattozzi @projektir

Fixes #98.

Copy link
Owner

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Sorry for the long review time. Looking forward to getting back into working on this stuff.

@steveklabnik steveklabnik merged commit 85d5294 into steveklabnik:master Nov 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants