Skip to content

fix(response): serialize response data as JSON - #240

Open
nickita-khylkouski wants to merge 1 commit into
resend:mainfrom
nickita-khylkouski:fix/response-json-serialization
Open

nickita-khylkouski wants to merge 1 commit into
resend:mainfrom
nickita-khylkouski:fix/response-json-serialization

Conversation

@nickita-khylkouski

@nickita-khylkouski nickita-khylkouski commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Delegate Resend::Response#to_json to the wrapped response data. This makes direct and nested JSON serialization emit the API data instead of serializing the wrapper's instance variables.

Testing

  • bundle exec rake: 405 examples, 0 failures
  • RuboCop: 43 files inspected, no offenses

Summary by cubic

Fixes Resend::Response JSON serialization so to_json returns the API data instead of the wrapper's internal state.

  • Direct, nested, and JSON.generate calls now all serialize the response data as expected.
  • JSON formatting options like pretty_generate are preserved.

Written for commit a5e1e33. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant