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

Allow exclusion of org.json dependency #3249

Merged
merged 2 commits into from
Jan 11, 2023
Merged

Conversation

agavrilov76
Copy link
Contributor

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

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
@agavrilov76
Copy link
Contributor Author

@sazzad16 Can you review this one please? It is similar to the one for GSON.

@sazzad16
Copy link
Contributor

sazzad16 commented Jan 9, 2023

@agavrilov76 org.json classes (JSONObject, JSONArray) are present in CommandObject class. So this change won't work like it did for Gson.

@agavrilov76
Copy link
Contributor Author

@sazzad16 I've successfully tested this change. I think it is going to work.

JVM will load org.json classes only when the JSON command objects are actually being created, that is, the first time jsonXXX methods are called.

I can create a repo to demo.

@sazzad16
Copy link
Contributor

@agavrilov76 You're right. Just tested myself. Seems to be working. Thanks!

@sazzad16 sazzad16 added breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. maintenance labels Jan 11, 2023
@sazzad16 sazzad16 added this to the 4.4.0 milestone Jan 11, 2023
@sazzad16 sazzad16 merged commit bc1d02a into redis:master Jan 11, 2023
@sazzad16 sazzad16 removed the breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. label Jan 24, 2023
@agavrilov76
Copy link
Contributor Author

@sazzad16 do you plan to release 4.4.0 soon ?

@sazzad16
Copy link
Contributor

sazzad16 commented Mar 8, 2023

@agavrilov76 4.4.0 seems to take some time. Please use latest milestone release (if possible). Those can be considered as good as the full release (with rare breaking changes).

@agavrilov76
Copy link
Contributor Author

@sazzad16 I'm waiting for the release with an ability to exclude unwanted JSON dependencies (the one I've contributed with :)) so I can migrate to 4.X.

I hope you can find time to release 4.4.0 some time soon (thanks for maintaining the project, btw!)

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

Successfully merging this pull request may close these issues.

2 participants