-
Notifications
You must be signed in to change notification settings - Fork 303
Add optional compile-time depth limit for reader #235
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
Conversation
Idea based on the patch in orjson by ijl.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #235 +/- ##
==========================================
- Coverage 98.53% 98.34% -0.20%
==========================================
Files 2 2
Lines 9098 9102 +4
==========================================
- Hits 8965 8951 -14
- Misses 133 151 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
Since we already have several warning suppressions, I'm okay with using |
Alright. Would you prefer |
|
Could add here globally: Lines 44 to 50 in 351b5d7
|
|
Added the pragma – sorry for the delay, didn't get a notification of your reply. |
Idea based on the patch in orjson.
When no limit is compiled in, there is no performance impact.
I didn't add a test case (seemed pretty hairy to do so while keeping the rest of the tests intact, but let me know if there's a neat way to do that), but there's an "experiment" file you can run:
Use e.g.
to see this in action: