-
Notifications
You must be signed in to change notification settings - Fork 239
JMESPath evaluation #2878
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
base: main
Are you sure you want to change the base?
JMESPath evaluation #2878
Conversation
# Conflicts: # VERSION
|
This pull request does not contain a staged changelog entry. To create one, use the Make sure that the description is appropriate for a changelog entry and that the proper feature type is used. See |
|
This pull request does not contain a staged changelog entry. To create one, use the Make sure that the description is appropriate for a changelog entry and that the proper feature type is used. See |
Background
JmespathExpressionsJmespathRuntime<T>interface to provide the necessary basic operations on JSON values at runtime.Evaluatoris largely ported over fromsmithy-java'sJMESPathDocumentQuery, but also taking some inspiration fromjmespath-java, which also has a generic interface for adapting any existing JSON value representation.JmespathRuntime<T>implementations for bothLiteralExpressionandNode.smithy-jmespath-testsmodule with the compliance tests from https://github.com/jmespath/jmespath.test, and instantiates them for both runtime implementations.smithy-javaevaluator only works on its ownDocumenttype, and evaluating expressions on generated types such asSerializableStructsubtypes currently requires first converting to aDocument, which is slow. I've also written up implementations ofJmespathRuntimeforDocumentand generated types: seesmithy-javalink below.@shapeExamplestrait (Add new shapeExamples trait that communicates and enforces allowed and disallowed values #2851)Testing
smithy-jmespath-testsmodule.Links
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.