-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Predicate testing forces dependency on Minidev json-smart #274
Comments
I also hit this issue when running in OSGi environment. I even considered installing json smart library to work around it, but finally I ended up dropping the predicates and manually checking the elements. I would love to see this fixed. |
I'd say this is a non-issue. IMO, |
If we had a way to parse JSON within the query in a provider-independent fashion, we could make the dependency optional again. Of course, we could just copy over the relevant code from the json-smart library, but I wouldn't consider that an optimal solution. |
I don't understand why the fix I proposed in the initial ticket is not appropriate. I have put a non-default |
See #275. Some providers do not support parsing JSON with single quotes. But since the JsonPath specs allow that, we cannot use the provider. |
When using a Predicate expression to filter a value, a new
Configuration
is built with nomappingProvider
(ValueNode
line 808). This forces theConfigurationBuilder
to callgetEffectiveDefaults()
. If an alternatemappingProvider
was set on the context, but not set as a default, this will be ignored and the default minidevJsonReader
will be used; if it isn't on the classpath this causes ajava.lang.NoClassDefFoundError: net/minidev/json/writer/JsonReaderI
exception.Here's a simple test with a predicate expression:
If you do not have minidev json-smart on your classpath, this test will throw
I believe this could be fixed by changing
ValueNode
line 808 to explicitly set themappingProvider
(even if it is never used).to
The text was updated successfully, but these errors were encountered: