Skip to content
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

Add write-only serializer for EntityMetadata #229

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

jviau
Copy link
Member

@jviau jviau commented Oct 23, 2023

Adds a custom write-only System.Text.Json JsonConverter for EntityMetadata<TState> to allow for serializing this type in responses. This is write-only at the time as we do not see value in reading this type, especially since the EntityMetadata derived type needs the DataConverter supplied to it. Supporting write has value as without a custom converter, accessing .State could throw depending on the value of IncludesState.

@jviau jviau merged commit 738f5e4 into microsoft:main Nov 10, 2023
@jviau jviau deleted the metadata-serialize branch November 10, 2023 18:28
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