Add null type parser #32
Reference in New Issue
Block a user
Delete Branch "add-null"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I was trying to create a model with a schema containing fields like
but failing with the error
To address this I've added a parser for the null type based on the boolean and integer parsers.
With this change, the example
as expected produces
PS - this library looks like it'll be really useful, thanks!
⚠️ Please install the
to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
✅ All modified and coverable lines are covered by tests.
📢 Thoughts on this report? Let us know!
Technically you could solve your initial requirement using the following schema:
That said, I also understand that for this tool to be compliant with the JSON Schema specification, we’ll eventually need to support all types defined in the spec.
I tested your code and found a few issues, which I’ve fixed in this PR. Since the fixes are included here, I’ll go ahead and merge your changes.