Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default python serialization #394

Merged
merged 7 commits into from
Feb 1, 2024
Merged

Conversation

hinthornw
Copy link
Collaborator

Fall back to repr when you reach a certain depth of regular class traversal

_MAX_DEPTH = 3


def _serialize_json(obj: Any, depth: int = 0) -> Any:
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to handle lists or dicts or tuples here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@hinthornw hinthornw merged commit 9bf23e4 into main Feb 1, 2024
4 checks passed
@hinthornw hinthornw deleted the wfh/update_serialization branch February 1, 2024 23:36
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