-
Notifications
You must be signed in to change notification settings - Fork 167
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 decoding raw strings #235
Conversation
* Note that this option only applies to string values, not map keys. Additionally, when | ||
* enabled, raw string length is limited by the maxBinLength option. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not do this for map keys as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This library doesn't support binary keys, so I decided to skip that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't. Sounds a good decision.
Sorry for the delayed response. Thanks for your contribution. LGTM. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #235 +/- ##
==========================================
- Coverage 98.55% 98.07% -0.48%
==========================================
Files 16 16
Lines 1037 1092 +55
Branches 200 249 +49
==========================================
+ Hits 1022 1071 +49
- Misses 15 21 +6 ☔ View full report in Codecov by Sentry. |
This PR adds the ability to skip UTF-8 decoding of strings when you enable the
rawStrings
decoding option.This is useful because I have encountered some encoded msgpack strings which do not contain valid UTF-8 data, and without a feature like this, it would be impossible to decode them properly.
According to the msgpack spec, this ability is encouraged: