Add option to ignore mismatched array lengths due to `null`/`undefined`.
This change adds an option array.ignoreLength which, when set to true, prevents adding n to tables decoded from arrays with null or undefined entries, such as "[null,42]".
This allows iterating over the tables using pairs without encountering a key/value pair that was not part of the JSON data.
The option defaults to false to preserve the current behavior for any existing callers.
Codecov Report
Merging #42 into master will increase coverage by
<.01%. The diff coverage is100%.
@@ Coverage Diff @@
## master #42 +/- ##
==========================================
+ Coverage 95.98% 95.98% +<.01%
==========================================
Files 18 18
Lines 1021 1022 +1
==========================================
+ Hits 980 981 +1
Misses 41 41
| Impacted Files | Coverage Δ | |
|---|---|---|
| lua/json/decode/composite.lua | 100% <100%> (ø) |
:arrow_up: |
| lua/json/decode/state.lua | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b5e3c9b...049dc46. Read the comment docs.