You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am setting the MissingMemberHandling to Error in the JsonApiSerializerSettings so that if there are any unknown/non-declared property in the json, I get deserialization error. However the setting is getting ignored.
Support for MissingMemebrHandling.Error is required to implement this particular part of the JSON:API spec where you want the API to reject unsupported updates which contain attributes which are not recognised:
A server MUST return 403 Forbidden in response to an unsupported request to update a resource or relationship.
Hi,
I am setting the MissingMemberHandling to Error in the JsonApiSerializerSettings so that if there are any unknown/non-declared property in the json, I get deserialization error. However the setting is getting ignored.
Whereas when using the same setting with JsonSerializerSettings, the error do get generated.
Below error gets generated at the deserialization:
Could not find member '{property}' on object of type '{type}'
I have also created a sample application for reference:
https://github.com/ShawetaKumar/JsonDeserialization
I have also added a failing test to the code to verify the same
When_passed_unknown_property_should_throw_exception_when_missing_member_handling_set_to_error
https://github.com/ShawetaKumar/JsonApiSerializer/blob/bug/missing-member-handling/tests/JsonApiSerializer.Test/DeserializationTests/DeserializationExceptionTests.cs
The text was updated successfully, but these errors were encountered: