-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[Feature]: Support custom json codec at runtime #3391
base: master
Are you sure you want to change the base?
Conversation
@appleboy Please take a look, thanks~ |
160b21c
to
965e7b1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3391 +/- ##
==========================================
- Coverage 99.21% 99.19% -0.03%
==========================================
Files 42 43 +1
Lines 3182 2722 -460
==========================================
- Hits 3157 2700 -457
+ Misses 17 12 -5
- Partials 8 10 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
965e7b1
to
0b20d8b
Compare
good job! I need the feature. |
2679a12
to
ec8ebbb
Compare
@timandy We move to the next milestone v1.11 |
I recommend removing all third-party JSON packages after defining the JsonApi to reduce dependencies. We should not piling json libraries |
Agree with this, I don't want to see four different json implementations in one web framework. |
@timandy Can you create a new PR? I can't handle this PR (maybe no permission to trigger CI testing) |
@appleboy All right, I will rebase on the latest commit. |
@timandy Thanks. |
@aohanhongzhi I have rebased it, Please tabke a look. |
related: #3766 |
Extract out an interface
api.JsonApi
to define all serialization and deserialization behaviors.Developers only need to implement the interface and set the value of
json.API
to custom json codec.In the future, we can define
api.XmlApi
in the same way.Solved #3217