Skip to content

Add virtual method to extend the complex property serialization - #656

Merged
xuzhg merged 3 commits into
mainfrom
ComplexSerializer
Aug 12, 2022
Merged

Add virtual method to extend the complex property serialization#656
xuzhg merged 3 commits into
mainfrom
ComplexSerializer

Conversation

@xuzhg

@xuzhg xuzhg commented Aug 8, 2022

Copy link
Copy Markdown
Member

A lot of customers complain about the complex property serialization.
For example, they want to control the complex property serialization in some circumstances, for example, if its value is null, skip it.

This PR simply adds a virtual method that the customer can override to control the complex property serialization.

This is the same as the navigation property serialization.

Comment thread src/Microsoft.AspNetCore.OData/Formatter/Serialization/ODataResourceSerializer.cs Outdated
Comment thread src/Microsoft.AspNetCore.OData/Formatter/Serialization/ODataResourceSerializer.cs Outdated
gathogojr
gathogojr previously approved these changes Aug 10, 2022

@gathogojr gathogojr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@xuzhg

xuzhg commented Aug 11, 2022

Copy link
Copy Markdown
Member Author

@gathogojr Resolved the comments, please take a look again.

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.

2 participants