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

Make ctor for DefaultPayloadConverter public to expose JsonSerializerOptions #226

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

ElanHasson
Copy link
Contributor

Resolves #225.

What was changed

Made the ctor for DefaultPayloadConverter public to expose JsonSerializerOptions.

Why?

This is to allow customizing the json serializer without creating a new Payload Converter and incurring additional configuration overhead.

Checklist

  1. Closes [Feature Request] Make protected DefaultPayloadConverter constructors public #225

  2. How was this tested:
    The compiler + existing tests.

  3. Any docs updates needed?
    Do not think so. Maybe worth a mention of this capability via Sample request: Custom converter samples-dotnet#38

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Looks great. I'm going to merge main into your branch and then will merge this into main upon CI complete. Thanks!

@@ -87,7 +79,6 @@ protected DefaultPayloadConverter(params IEncodingConverter[] encodingConverters

// KeyedCollection not worth it and OrderedDictionary not generic. So we'll expose the
// collection and maintain an internal dictionary.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this line removal broke lint check, may need to add it back. Also note since I merged main into your branch, you'll want to pull before making this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cretz mobile edits ftw :)

Should be good for you to retrigger CI

@cretz cretz merged commit 899672c into temporalio:main Apr 22, 2024
6 checks passed
@ElanHasson ElanHasson deleted the patch-1 branch April 23, 2024 06:10
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.

[Feature Request] Make protected DefaultPayloadConverter constructors public
2 participants