Skip to content

Feature Request: Make dependencies on the different providers json-smart, jackson, gson optional #101

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

Closed
forsthofer opened this issue Jun 26, 2015 · 3 comments

Comments

@forsthofer
Copy link

The current 2.0.0 version has in the OSGi manifest mandatory imports for the different JSON providers:
com.fasterxml.jackson.core;version="[2.4,3)",
com.fasterxml.jackson.databind;version="[2.4,3)",
com.fasterxml.jackson.databind.type;version= "[2.4,3)",
com.google.gson;version="[2.3,3)",
com.google.gson.internal; version="[2.3,3)",
com.google.gson.reflect;version="[2.3,3)",
net.minidev.json;version="[2.1,3)",
net.minidev.json.parser;version="[2.1,3)",
net.minidev.json.writer;version="[2.1,3)"

It would be great to make all these dependencies optional, so that the OSGi bundle gets resolved without all the JSON providers. Of course you have to provide at least one provider to be able to run jasonpath successfully. However, this solution would be much leaner.

Beside the changes in the manifest file, also changes in the DefaultsImpl must be made. This class must be made more flexible: If the json-smart provider is not in the classpath, this class could look for providers which are in the classpath and use the first found provider.

If you which I can create a pull request.

@forsthofer
Copy link
Author

I found out that changes in DefaultsImpl are not necessary. You just have to set an other Default instance in the configuration before the first call is made.

@kallestenflo
Copy link
Contributor

Fixed for 2.1.

@jochenberger
Copy link
Contributor

I don't think we should make/have made json-smart optional. See #274, #314.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants