René's URL Explorer Experiment


Title: Customizable Serialization for Activity Return Values in Durable Functions · Issue #206 · microsoft/durabletask-java · GitHub

Open Graph Title: Customizable Serialization for Activity Return Values in Durable Functions · Issue #206 · microsoft/durabletask-java

X Title: Customizable Serialization for Activity Return Values in Durable Functions · Issue #206 · microsoft/durabletask-java

Description: What’s the problem? Hey👋, I'm working with Durable Functions in Java, and I’ve encountered an issue with how activity return values are serialized. Specifically: Activity functions return POJOs annotated with Jackson and Gson and having ...

Open Graph Description: What’s the problem? Hey👋, I'm working with Durable Functions in Java, and I’ve encountered an issue with how activity return values are serialized. Specifically: Activity functions return POJOs ann...

X Description: What’s the problem? Hey👋, I'm working with Durable Functions in Java, and I’ve encountered an issue with how activity return values are serialized. Specifically: Activity functions return POJOs...

Opengraph URL: https://github.com/microsoft/durabletask-java/issues/206

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Customizable Serialization for Activity Return Values in Durable Functions","articleBody":"## **What’s the problem?**\nHey👋,  \n\nI'm working with **Durable Functions in Java**, and I’ve encountered an issue with how **activity return values are serialized**. Specifically:  \n\n- **Activity functions return POJOs** annotated with Jackson and Gson and having subTypes, which is deserialized using Gson when entering the activity but none is used for serializing return value.  \n- This creates **inconsistencies**.  \n- There's **no way to customize** the serialization mechanism for Durable Functions activities.  \n- Raises an Exception of InvalidTypeIdException because the type is missing at com.microsoft.durabletask.JacksonDataConverter#deserialize. \n\n---\n\n## **How to reproduce it?**\nHere’s a minimal Durable Function example where an **Activity returns a POJO**, but the **Azure Functions Java Worker does not deserialize it properly**:\n\n### **1️⃣ POJO with Jackson & Gson annotations and Subtypes**\n```java\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.google.gson.annotations.JsonAdapter;\nimport com.google.gson.annotations.SerializedName;\nimport com.google.gson.*;\nimport java.io.IOException;\n\n@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = \"type\")\n@JsonSubTypes({\n    @JsonSubTypes.Type(value = AdminUser.class, name = \"admin\"),\n    @JsonSubTypes.Type(value = RegularUser.class, name = \"regular\")\n})\n@JsonAdapter(UserTypeAdapter.class)\npublic abstract class User {\n    private String id;\n\n    private String name;\n\n    public User() {}\n\n    public User(String id, String name) {\n        this.id = id;\n        this.name = name;\n    }\n\n    public String getId() { return id; }\n    public String getName() { return name; }\n}\n\npublic class AdminUser extends User {\n    private int adminLevel;\n\n    public AdminUser() {}\n    public AdminUser(String id, String name, int adminLevel) {\n        super(id, name);\n        this.adminLevel = adminLevel;\n    }\n}\n\npublic class RegularUser extends User {\n    private String membershipStatus;\n\n    public RegularUser() {}\n    public RegularUser(String id, String name, String membershipStatus) {\n        super(id, name);\n        this.membershipStatus = membershipStatus;\n    }\n}\n\npublic class UserTypeAdapter extends TypeAdapter\u003cUser> {\n    @Override\n    public void write(JsonWriter out, User user) throws IOException {\n        out.beginObject();\n        out.name(\"type\").value(user instanceof AdminUser ? \"admin\" : \"regular\");\n        out.name(\"id\").value(user.getId());\n        out.name(\"name\").value(user.getName());\n        if (user instanceof AdminUser) {\n            out.name(\"adminLevel\").value(((AdminUser) user).adminLevel);\n        } else if (user instanceof RegularUser) {\n            out.name(\"membershipStatus\").value(((RegularUser) user).membershipStatus);\n        }\n        out.endObject();\n    }\n\n    @Override\n    public User read(JsonReader in) throws IOException {\n        in.beginObject();\n        String type = \"\";\n        String id = \"\";\n        String name = \"\";\n        int adminLevel = 0;\n        String membershipStatus = \"\";\n        \n        while (in.hasNext()) {\n            String fieldName = in.nextName();\n            switch (fieldName) {\n                case \"type\":\n                    type = in.nextString();\n                    break;\n                case \"id\":\n                    id = in.nextString();\n                    break;\n                case \"name\":\n                    name = in.nextString();\n                    break;\n                case \"adminLevel\":\n                    adminLevel = in.nextInt();\n                    break;\n                case \"membershipStatus\":\n                    membershipStatus = in.nextString();\n                    break;\n                default:\n                    in.skipValue();\n                    break;\n            }\n        }\n        in.endObject();\n        \n        return \"admin\".equals(type) ? new AdminUser(id, name, adminLevel) : new RegularUser(id, name, membershipStatus);\n    }\n}\n```\n\n## **What do you want to happen?**\n✅ **Supporting GSON for serialization**.  \n\n","author":{"url":"https://github.com/MANDA-LAWINE","@type":"Person","name":"MANDA-LAWINE"},"datePublished":"2025-03-16T19:01:07Z","url":"https://github.com/microsoft/durabletask-java/issues/206"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7c7648ee-5052-379a-c655-9becace85e7e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAAA2:1A9D43:83A69:AC6B8:6AFE31C7
html-safe-noncedf8b816bf091210d0f88d89d758bd20e4d64a6d296704a9bc8ababf6e8599f17
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUEyOjFBOUQ0Mzo4M0E2OTpBQzZCODo2QUZFMzFDNyIsInZpc2l0b3JfaWQiOiIxNDQxODIwNTQ4ODMyMDQ3NTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac99860d6f6b88513daf40405e8c7a68f1df301bafd02fa25e92ce9a4b59237107
hovercard-subject-tagissue:2923249004
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-java/206/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3ed4e52067e089f21db78d672c3674f46f4863dc11213a528f22bf359e962b56/microsoft/durabletask-java/issues/206
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3ed4e52067e089f21db78d672c3674f46f4863dc11213a528f22bf359e962b56/microsoft/durabletask-java/issues/206
og:image:altWhat’s the problem? Hey👋, I'm working with Durable Functions in Java, and I’ve encountered an issue with how activity return values are serialized. Specifically: Activity functions return POJOs ann...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMANDA-LAWINE
hostnamegithub.com
expected-hostnamegithub.com
Noned70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2
turbo-cache-controlno-preview
go-importgithub.com/microsoft/durabletask-java git https://github.com/microsoft/durabletask-java.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id452823832
octolytics-dimension-repository_nwomicrosoft/durabletask-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id452823832
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseccb88d9c92abe69245b429398c8a57ae87070c7c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/durabletask-java/issues/206#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-java%2Fissues%2F206
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-java%2Fissues%2F206
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fdurabletask-java
Reloadhttps://github.com/microsoft/durabletask-java/issues/206
Reloadhttps://github.com/microsoft/durabletask-java/issues/206
Reloadhttps://github.com/microsoft/durabletask-java/issues/206
microsofthttps://github.com/microsoft
durabletask-javahttps://github.com/microsoft/durabletask-java
Codehttps://github.com/microsoft/durabletask-java
Issues47 (47)https://github.com/microsoft/durabletask-java/issues
Pull requests4 (4)https://github.com/microsoft/durabletask-java/pulls
Actionshttps://github.com/microsoft/durabletask-java/actions
Projectshttps://github.com/microsoft/durabletask-java/projects
Security and qualityhttps://github.com/microsoft/durabletask-java/security
Insightshttps://github.com/microsoft/durabletask-java/insights
https://github.com/microsoft/durabletask-java
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-java/issues/206
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-java/issues/206
Customizable Serialization for Activity Return Values in Durable Functionshttps://github.com/microsoft/durabletask-java/issues/206#top
P2Priority 2https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22P2%22
https://github.com/MANDA-LAWINE
Abdellatif ABAZINE (MANDA-LAWINE)https://github.com/MANDA-LAWINE
on Mar 16, 2025https://github.com/microsoft/durabletask-java/issues/206#issue-2923249004
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Needs: Triage 🔍https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22Needs%3A%20Triage%20%3Amag%3A%22
on Mar 16, 2025https://github.com/microsoft/durabletask-java/issues/206#event-16791840862
Anatoli Beliaev (AnatoliB)https://github.com/AnatoliB
P2Priority 2https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22P2%22
Needs: Triage 🔍https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22Needs%3A%20Triage%20%3Amag%3A%22
on Apr 8, 2025https://github.com/microsoft/durabletask-java/issues/206#event-17178738697
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/durabletask-java/issues/206
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/durabletask-java/issues/206
P2Priority 2https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22P2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.