You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(runtime): Improve JSON serialization for consistent handling (#14)
Refactor JSON serialization to ensure consistent handling between streaming
and non-streaming responses. This change:
1. Adds a new _safe_serialize_to_json_string method that handles serialization
with progressive fallbacks for non-serializable objects
2. Updates _convert_to_sse to use the new method for consistency
3. Modifies non-streaming responses to use the same serialization logic
4. Adds comprehensive tests for serialization edge cases
This ensures that both streaming and non-streaming responses handle complex
objects like datetime, Decimal, sets, and Unicode characters consistently.
🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)
cr: https://code.amazon.com/reviews/CR-209344425
0 commit comments