Skip to content

Conversation

@whippet71
Copy link

The docs state that if a property is not required but also cannot be a null value, then we can mark it with (Required = Required.DisallowNull). However if the property is set to null, the error message displayed is "Required property '{propName}' expects a non-null value", which is incorrect, as the property is not required.

The fix is to change the error message in JsonSerializerInternalReader.cs, and to update JsonSerializerTests.cs accordingly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant