Skip to content

Conversation

@YunchuWang
Copy link
Member

@YunchuWang YunchuWang commented Nov 12, 2025

Fix #3182

This PR enables polymorphic deserialization of input payloads in the Durable Functions extension. In practical terms, it allows the system to accept inputs where the payload type isn’t known at compile time (or is one of several derived types) and properly deserialize them into the right concrete types rather than always using a base type or failing.

🧠 What the change addresses

Prior issue: Activities (especially in the isolated worker model) using e.g. Newtonsoft.Json or other serializers could not reliably handle input JSON that contained a type discriminator or represented a derived type of the declared parameter. This prevented polymorphic scenarios.

Issue describing the changes in this PR

resolves #issue_for_this_pr

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation PR is ready to merge and referenced in pending_docs.md
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)
  • My changes do not require any extra work to be leveraged by OutOfProc SDKs
    • Otherwise: That work is being tracked here: #issue_or_pr_in_each_sdk
  • My changes do not change the version of the WebJobs.Extensions.DurableTask package
    • Otherwise: major or minor version updates are reflected in /src/Worker.Extensions.DurableTask/AssemblyInfo.cs
  • My changes do not add EventIds to our EventSource logs
    • Otherwise: Ensure the EventIds are within the supported range in our existing Windows infrastructure. You may validate this with a deployed app's telemetry. You may also extend the range by completing a PR such as this one.
  • My changes should be added to v2.x branch.
    • Otherwise: This change applies exclusively to WebJobs.Extensions.DurableTask v3.x. It will be retained only in the dev and main branches and will not be merged into the v2.x branch.

@YunchuWang YunchuWang changed the title Support Polymorphic input payload deserialization Support Polymorphic input payload deserialization (isolated dotnet) Nov 12, 2025
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.

Polymorphic deserialization of activity input fails (Isolated worker with Newtonsoft)

2 participants