jedis icon indicating copy to clipboard operation
jedis copied to clipboard

Replace both org.json and gson with jackson-databind

Open sazzad16 opened this issue 3 years ago • 6 comments

sazzad16 avatar Nov 16 '22 14:11 sazzad16

Is it the same as the pr below: https://github.com/redis/jedis/pull/3205

zeekling avatar Nov 19 '22 15:11 zeekling

@zeekling This PR is an extension of #3205 which replaces only org.json:json. This also replaces gson.

sazzad16 avatar Nov 19 '22 15:11 sazzad16

@chayim @dengliming @yangbodong22011

Do you have like or dislike for this or #3205 ?

Either of these is a breaking change (affects only RedisJSON commands) but we are considering for Jedis 4.4.0.

sazzad16 avatar Nov 22 '22 05:11 sazzad16

@chayim @dengliming @yangbodong22011

Do you have like or dislike for this or #3205 ?

Either of these is a breaking change (affects only RedisJSON commands) but we are considering for Jedis 4.4.0.

I read the related issue, is there an option for us to wait for the dust to settle on the license changes in this comment before making a decision?

Another question is why we rely on both org.json and google.gson now, can only relying on google.gson not meet our needs?

yangbodong22011 avatar Nov 22 '22 07:11 yangbodong22011

Another question is why we rely on both org.json and google.gson now, can only relying on google.gson not meet our needs?

Gson was being used in JRedisJSON. That's where we got it from.

But Gson (at least with default settings) was not so friendly with RedisJSON v2's replies while it is easy for org.json: https://github.com/redis/jedis/blob/11a4513ff9581a40530a84e6c8ee019c4a3f9e38/src/main/java/redis/clients/jedis/BuilderFactory.java#L1597-L1605 https://github.com/redis/jedis/blob/11a4513ff9581a40530a84e6c8ee019c4a3f9e38/src/main/java/redis/clients/jedis/BuilderFactory.java#L1614

Due to this and almost no development in Gson, org.json was chosen for RedisJSON v2.

sazzad16 avatar Nov 22 '22 09:11 sazzad16

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (13321d2) 66.93% compared to head (16ab2be) 66.94%. Report is 231 commits behind head on master.

Files Patch % Lines
.../main/java/redis/clients/jedis/BuilderFactory.java 60.00% 4 Missing :warning:
.../main/java/redis/clients/jedis/CommandObjects.java 88.57% 4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3206      +/-   ##
============================================
+ Coverage     66.93%   66.94%   +0.01%     
- Complexity     4609     4610       +1     
============================================
  Files           252      252              
  Lines         14881    14892      +11     
  Branches        923      919       -4     
============================================
+ Hits           9960     9970      +10     
- Misses         4523     4525       +2     
+ Partials        398      397       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Nov 23 '22 01:11 codecov-commenter