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

Add disallow_invalid_utf8 option for decoding #44

Merged
merged 3 commits into from
Jun 9, 2019

Conversation

sile
Copy link
Owner

@sile sile commented May 27, 2019

This PR adds reject_invalid_utf8 option.
By setting the option with the value false when decoding, you can reject JSON strings that contain invalid UTF-8 byte sequences.
See also: #37

@codecov-io
Copy link

codecov-io commented May 27, 2019

Codecov Report

Merging #44 into master will decrease coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
- Coverage   88.38%   88.37%   -0.02%     
==========================================
  Files           3        3              
  Lines         267      344      +77     
==========================================
+ Hits          236      304      +68     
- Misses         31       40       +9
Impacted Files Coverage Δ
src/jsone.erl 38.46% <ø> (+9.89%) ⬆️
src/jsone_decode.erl 98.34% <66.66%> (-0.81%) ⬇️
src/jsone_encode.erl 88.83% <0%> (+3.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da850bd...0b9dc77. Read the comment docs.

@sile sile changed the title Add allow_invalid_utf8 option for decoding Add disallow_invalid_utf8 option for decoding May 27, 2019
@sile sile merged commit 96c2014 into master Jun 9, 2019
@sile sile deleted the add-allow-invalid-utf8-option branch June 9, 2019 09:06
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.

2 participants