Skip to content

feat(parse): add unknown_fields keyword#451

Open
quinnj wants to merge 2 commits intomasterfrom
codex/unknown-fields-keyword
Open

feat(parse): add unknown_fields keyword#451
quinnj wants to merge 2 commits intomasterfrom
codex/unknown-fields-keyword

Conversation

@quinnj
Copy link
Copy Markdown
Member

@quinnj quinnj commented Apr 22, 2026

Summary

  • add an unknown_fields keyword to typed JSON.parse/parsefile/parse!
  • preserve the current ignore-by-default behavior while allowing unknown_fields=:error
  • update tests and reading docs, and bump the StructUtils compat floor to 2.8

Testing

  • julia --project -e 'using Pkg; Pkg.test()'

Add an  keyword to typed JSON parsing and parse!
that preserves the current ignore behavior by default while allowing
callers to reject unmatched members with .

This updates the JSON read style plumbing to use StructUtils 2.8's
unknownfield hook, adds regression tests for nested and in-place
parsing, and documents the new option.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.29%. Comparing base (f4fbb5a) to head (8332c6b).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
src/parse.jl 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #451      +/-   ##
==========================================
+ Coverage   90.26%   90.29%   +0.03%     
==========================================
  Files           7        7              
  Lines        1366     1391      +25     
==========================================
+ Hits         1233     1256      +23     
- Misses        133      135       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant