[PR #537] [CLOSED] Updated the JsonPlus class to handle generator objects within dictionaries, lists, and tuples. #1523

Closed
opened 2026-02-20 17:44:57 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraph/pull/537
Author: @shiwenbin1617
Created: 5/27/2024
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 05436f5 - Added a recursive method to convert generators to lists before serialization.

📊 Changes

1 file changed (+14 additions, -2 deletions)

View changed files

📝 langgraph/serde/jsonplus.py (+14 -2)

📄 Description

  • Updated the JsonPlus class to handle generator objects within dictionaries, lists, and tuples.
  • This fixes the TypeError: Object of type generator is not JSON serializable issue.
    image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraph/pull/537 **Author:** [@shiwenbin1617](https://github.com/shiwenbin1617) **Created:** 5/27/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`05436f5`](https://github.com/langchain-ai/langgraph/commit/05436f5fd3a8390ade581fbdc8a5f9ef73558d0b) - Added a recursive method to convert generators to lists before serialization. ### 📊 Changes **1 file changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/serde/jsonplus.py` (+14 -2) </details> ### 📄 Description - Updated the JsonPlus class to handle generator objects within dictionaries, lists, and tuples. - This fixes the TypeError: Object of type generator is not JSON serializable issue. ![image](https://github.com/langchain-ai/langgraph/assets/136685106/8486f665-f9c9-44ea-bf51-2cba88a5e185) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-20 17:44:57 -05:00
yindo closed this issue 2026-02-20 17:44:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1523