Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #68 +/- ##
==========================================
+ Coverage 97.11% 97.77% +0.66%
==========================================
Files 9 11 +2
Lines 1073 1306 +233
==========================================
+ Hits 1042 1277 +235
+ Misses 22 21 -1
+ Partials 9 8 -1 ☔ View full report in Codecov by Sentry. |
|
I, too, do not enjoy needing two calls for peace-of-mind that my JSON will not break once I start processing it. This would be super handy to have merged into the library, and the PR looks well-tested and benchmarked. @valyala, is there some hesitation with this feature which has left it in limbo for so long? If not, I think a lot of people would appreciate being able to avoid separate invocations. 🙏 |
|
I've updated the symbol names. |
Presently, users that want to validate their json before parsing need to run
ValidateandParseseparately.This is inefficient because each json string must be scanned twice.
This PR introduces a
ValidParserwhich validates as it parses.It is slightly less efficient than the normal parser, but much more efficient than running
ValidateandParseseparately.Adds 7 new symbols to the API:
See #58