Skip to content

Attributes may be missing in response when the JSON serializer is configured to suppress nulls or defaults #1078

Closed
@bart-degreed

Description

@bart-degreed

Conditions under which this bug occurs:

  • SerializerNullValueHandling or SerializerDefaultValueHandling is set to Ignore in IJsonApiOptions.SerializerSettings
  • The resource model consists of multiple attributes
  • A non-last attribute is set to null or its default value

In this case, any attributes following the attribute whose value is null or default are omitted from the response body.

This is caused by lines:

and: , which should continue instead of return.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions