Skip to content

Add bool decoding to the fuzzy decoder extension #466

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thfix13
Copy link

@thfix13 thfix13 commented Jun 6, 2020

According to the table here, "fuzzy mode" should be able to support decoding multiple JSON types into a Go bool. However, that's not currently the case.

This PR adds a fuzzy bool decoder to the fuzzy decoder extension, with behaviour in line with the table (modulo arrays and objects, which don't seem to be handled for other Go types at the moment, either — the code to handle these is included anyway, commented out for consistency with other types).

@codecov
Copy link

codecov bot commented Jun 6, 2020

Codecov Report

Merging #466 into master will decrease coverage by 0.27%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
- Coverage   86.52%   86.25%   -0.28%     
==========================================
  Files          41       41              
  Lines        5100     5100              
==========================================
- Hits         4413     4399      -14     
- Misses        546      560      +14     
  Partials      141      141              
Impacted Files Coverage Δ
reflect_struct_decoder.go 82.68% <0.00%> (-1.87%) ⬇️

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 cd6773e...32c48e4. Read the comment docs.

@thfix13 thfix13 force-pushed the add-fuzzy-bool-decoding branch from fec0ed6 to 32c48e4 Compare June 6, 2020 04:27
@thfix13 thfix13 marked this pull request as ready for review June 9, 2020 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant