-
-
Notifications
You must be signed in to change notification settings - Fork 5
Default value of null
in an union schema causes panic.
#1
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
Comments
Hi @amrx101 Thanks for reporting this. Looks like we need to put priority on iterating over the schema fields when creating fields of the Record instance. Right now Here's how we might solve this:
Code: Line 93 in e79a420
Note: The schema might also be a union so we need to take into account of trying all the variants in the union schema when parsing default value from schema, as is the case with your example. Wanna make a PR for this? |
Yup will make a PR for that. |
@amrx101 Any update on this? |
Not yet. Bit busy here due to the releases coming in |
When we have a union type with
null
and a default value ofnull
, theserialisation
causes error at run time.The schema. Here in we can see that we have union type with
null
and default valuenull
.This serialisation results in
Err` value: DefaultValueParse
The text was updated successfully, but these errors were encountered: