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

Support users to customize JsonUtil #14508

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Conversation

oxsean
Copy link
Collaborator

@oxsean oxsean commented Aug 9, 2024

What is the purpose of the change

In http scenario, the user wants to customize the JSON conversion.

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

Copy link
Member

@CrazyHZM CrazyHZM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't entirely agree with this JsonUtilCustomizer. It increases the complexity of jsonutil and allows users to re-implement jsonutil if they want to customize some parameters

@oxsean
Copy link
Collaborator Author

oxsean commented Aug 11, 2024

I can't entirely agree with this JsonUtilCustomizer. It increases the complexity of jsonutil and allows users to re-implement jsonutil if they want to customize some parameters

It's really something we need to consider, This feature is for rest, the complexity is relative, for the end user to use JsonUtilCustomizer will make the customization easier, otherwise, because fastjson all use static parameters, customization is hard.

@oxsean oxsean force-pushed the jsonutil-customize branch 4 times, most recently from 1db050a to 04f5cf9 Compare August 12, 2024 08:55
@oxsean oxsean requested a review from AlbumenJ August 21, 2024 01:33
@oxsean oxsean force-pushed the jsonutil-customize branch 2 times, most recently from 3021f48 to e95b411 Compare August 21, 2024 04:30
Copy link

sonarcloud bot commented Aug 24, 2024

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.06%. Comparing base (392baa3) to head (1192f20).
Report is 21 commits behind head on 3.3.

Additional details and impacted files
@@            Coverage Diff             @@
##              3.3   #14508      +/-   ##
==========================================
+ Coverage   38.05%   38.06%   +0.01%     
==========================================
  Files        1804     1805       +1     
  Lines       80043    80094      +51     
  Branches    11898    11906       +8     
==========================================
+ Hits        30461    30491      +30     
- Misses      45190    45215      +25     
+ Partials     4392     4388       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CrazyHZM
Copy link
Member

CrazyHZM commented Sep 1, 2024

@oxsean The pr title could be changed.

@oxsean oxsean changed the title Support users to customize JsonUtil through JsonUtilCustomizer Support users to customize JsonUtil Sep 1, 2024
@AlbumenJ
Copy link
Member

AlbumenJ commented Sep 4, 2024

@chickenlj PTAL

# Conflicts:
#	dubbo-remoting/dubbo-remoting-http12/src/test/java/org/apache/dubbo/remoting/http12/message/codec/CodeUtilsTest.java
#	dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/http2/CompositeExceptionHandler.java
Copy link
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj merged commit 4a4d756 into apache:3.3 Sep 6, 2024
18 checks passed
@oxsean oxsean deleted the jsonutil-customize branch September 6, 2024 12:48
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

Successfully merging this pull request may close these issues.

5 participants