Skip to content

Null valued attributes are not omitted from included data #454

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

Closed
ddaspit opened this issue Dec 6, 2018 · 2 comments · Fixed by #461
Closed

Null valued attributes are not omitted from included data #454

ddaspit opened this issue Dec 6, 2018 · 2 comments · Fixed by #461
Labels

Comments

@ddaspit
Copy link

ddaspit commented Dec 6, 2018

Description

If DocumentBuilderOptions.OmitNullValuedAttributes is set to true and an included resource object has a null valued attribute, it will not be omitted. Any null valued attributes in primary resource objects are correctly omitted. It looks like DocumentBuilder.GetIncludedEntity() does not check OmitNullValuedAttribute() method when adding attributes.

Environment

  • JsonApiDotNetCore Version: 3.0
  • Other Relevant Package Versions:
@milosloub
Copy link
Contributor

I'll prepare fix for this within following days

milosloub added a commit that referenced this issue Dec 18, 2018
Omit null attributes in included array
@ddaspit
Copy link
Author

ddaspit commented Jan 8, 2019

Thank you for fixing this.

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

Successfully merging a pull request may close this issue.

3 participants