Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Add bool decoding to the fuzzy decoder extension#466

Open
thfix13 wants to merge 3 commits intojson-iterator:masterfrom
thfix13:add-fuzzy-bool-decoding
Open

Add bool decoding to the fuzzy decoder extension#466
thfix13 wants to merge 3 commits intojson-iterator:masterfrom
thfix13:add-fuzzy-bool-decoding

Conversation

@thfix13
Copy link
Copy Markdown

@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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant