-
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
feat(binding/json): check validity when bind json #3982
base: master
Are you sure you want to change the base?
Conversation
b3cb5ce
to
1aa47c8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3982 +/- ##
==========================================
- Coverage 99.21% 99.06% -0.15%
==========================================
Files 42 44 +2
Lines 3182 2779 -403
==========================================
- Hits 3157 2753 -404
+ Misses 17 15 -2
- Partials 8 11 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8290262
to
1367e07
Compare
json This part of the module is not suitable for use Such a function may still need further thinking and discussion. |
Hello, my previous description might not have been very clear. The current situation is that an incorrect JSON format returns |
@appleboy PTAL |
Signed-off-by: demoManito <1430482733@qq.com>
Description
The current situation is that an incorrect JSON format returns
unexpected EOF
. This usually happens when the JSON data is not fully received or the parser reaches an unexpected end of file. This error message may not be clear enough for users to understand where the issue lies.After this PR modification, it will return a more explicit error message
invalid JSON
, indicating that the received JSON data cannot be correctly parsed into a valid JSON structure, thus providing a clearer indication of formatting issues.