Skip to content
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

Prevent nulls inside array/lists #57

Closed
drhumlen opened this issue Mar 29, 2020 · 2 comments
Closed

Prevent nulls inside array/lists #57

drhumlen opened this issue Mar 29, 2020 · 2 comments

Comments

@drhumlen
Copy link

drhumlen commented Mar 29, 2020

You should not accept ["hello", null, "world"] unless the type is string option list. If the type is a string list with nulls inside, it should fail.

This has led to nasty NullReferenceExceptions in our backend because the code downstream expected a list of 'a, but the list turned out to contain some nulls.

I'm currently trying to fix it, but I'm unable to use the isNullableFieldType (from Helpers.fs) because the fsOptions: JsonFSharpOptions isn't avaiable in the type JsonListConverter<'T>() etc classes.

@drhumlen
Copy link
Author

#58

@drhumlen
Copy link
Author

drhumlen commented Apr 5, 2020

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants