Skip to content

Conversation

@djthorpe
Copy link
Member

@djthorpe djthorpe commented Jan 11, 2026

This PR changes the order of response decoding logic to prioritize custom Unmarshaler implementations over MIME type-based standard decoders (JSON, XML, etc.). Previously, custom unmarshalers were only used as a fallback for unknown MIME types.

Changes:

  • Moved the Unmarshaler interface check to execute before the MIME type switch statement
  • Added clarifying comment about preferring custom Unmarshaler when implemented
  • Removed redundant Unmarshaler check from the default case

Copilot AI review requested due to automatic review settings January 11, 2026 21:13
@djthorpe djthorpe changed the title Marshal take precedence Unmarshalling take precedence over decoding Jan 11, 2026
@djthorpe djthorpe self-assigned this Jan 11, 2026
Copy link
Contributor

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

This PR changes the order of response decoding logic to prioritize custom Unmarshaler implementations over MIME type-based standard decoders (JSON, XML, etc.). Previously, custom unmarshalers were only used as a fallback for unknown MIME types.

Changes:

  • Moved the Unmarshaler interface check to execute before the MIME type switch statement
  • Added clarifying comment about preferring custom Unmarshaler when implemented
  • Removed redundant Unmarshaler check from the default case

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

@djthorpe djthorpe merged commit 260bc3f into main Jan 11, 2026
10 checks passed
@djthorpe djthorpe deleted the djt/0111/unmarshall branch January 11, 2026 21:16
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