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

Could GSON be optional? / Jackson support? #2961

Open
sebdehne opened this issue Mar 29, 2022 · 4 comments
Open

Could GSON be optional? / Jackson support? #2961

sebdehne opened this issue Mar 29, 2022 · 4 comments
Labels
dependencies Pull request that updates a dependency

Comments

@sebdehne
Copy link

sebdehne commented Mar 29, 2022

I really appreciate the good work which has good into this excellent library, but does Jedis really need GSON for JSON-support?

For example there is a security issue with GSON (google/gson#1991) which now becomes everybodies problem who uses Jedis.
Would it be possible to at least make GSON optional such that Jedis still works even without GSON on the classpath? Or support both Jackson and GSON (which ever is found on the classpath) if one really needs the JSON capabilities?

Thanks a lot. If you need help - I can submit a change which makes gson optional.

@sebdehne sebdehne changed the title Why JSON support (gson)? Could GSON be optional? Mar 29, 2022
@sebdehne sebdehne changed the title Could GSON be optional? Could GSON be optional? / Jackson support? Mar 29, 2022
@sazzad16
Copy link
Collaborator

can submit a change which makes gson optional.

@sebdehne You're always welcome to craft a PR.

@sazzad16
Copy link
Collaborator

@sebdehne Sorry about slow progress on this.

WDYT about replacing Gson completely with Jackson?

agavrilov76 added a commit to agavrilov76/jedis that referenced this issue Dec 16, 2022
Move creation of the JSON command builders to a separate class which is initialized only when any of the JSON methods are being used. This allows org.json transitive Maven dependency to be excluded for the applications which don't use JSON methods.

See redis#2961 and redis#2962 for more information and rationale. Similar to redis#3223
sazzad16 pushed a commit that referenced this issue Jan 11, 2023
Move creation of the JSON command builders to a separate class which is initialized only when any of the JSON methods are being used. This allows org.json transitive Maven dependency to be excluded for the applications which don't use JSON methods.

See #2961 and #2962 for more information and rationale. Similar to #3223
@sazzad16 sazzad16 added dependencies Pull request that updates a dependency and removed enhancement labels May 19, 2023
@sazzad16
Copy link
Collaborator

Thanks to #3223, GSON can now be excluded.

Keeping this issue open as the dependency is not exactly optional.

Copy link

This issue is marked stale. It will be closed in 30 days if it is not updated.

@github-actions github-actions bot added the stale label May 19, 2024
@sazzad16 sazzad16 removed the stale label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull request that updates a dependency
Projects
None yet
Development

No branches or pull requests

2 participants