Skip to content

fix: use protojson camelcase default for wf payload serialization#104

Merged
yaron2 merged 1 commit into
dapr:mainfrom
sicoyle:fix-use-protojson-camelcase
May 15, 2026
Merged

fix: use protojson camelcase default for wf payload serialization#104
yaron2 merged 1 commit into
dapr:mainfrom
sicoyle:fix-use-protojson-camelcase

Conversation

@sicoyle
Copy link
Copy Markdown

@sicoyle sicoyle commented May 15, 2026

Summary

  • Proto-typed workflow payloads (e.g. google.protobuf.Struct) now serialize to camelCase JSON — the protojson default and standard JSON wire convention
  • Pure-Go payloads were already camelCase via json tags; this fixes mixed-case output when both flow through the same marshalData helper

Why

Workflow outputs were producing mixed camelCase/snake_case JSON depending on whether the field originated from a proto type or a Go struct. External consumers (MCP spec, JSON SDKs in other languages) expect camelCase consistently. Defaulting protojson to camelCase aligns proto payloads with that convention.

Signed-off-by: Samantha Coyle <sam@diagrid.io>
Copilot AI review requested due to automatic review settings May 15, 2026 19:39
@sicoyle sicoyle requested a review from a team as a code owner May 15, 2026 19:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Switches protojson marshaling for workflow payloads from snake_case (UseProtoNames: true) to the default camelCase, aligning proto-typed payloads with Go-struct payloads and standard JSON conventions.

Changes:

  • Drop UseProtoNames: true in task/executor.go protoMarshaler.
  • Drop UseProtoNames: true in api/orchestration.go protoMarshaler.
  • Update accompanying doc comments.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
task/executor.go Use default protojson options (camelCase) for workflow payload marshaling.
api/orchestration.go Use default protojson options (camelCase) for workflow payload marshaling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yaron2 yaron2 merged commit 1a486ff into dapr:main May 15, 2026
5 of 6 checks passed
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.

3 participants