Skip to content

Conversation

@hashtagchris
Copy link
Contributor

deepMap currently returns empty objects ({}) for common types like Date and URL. This PR updates deepMap to check for a toJSON custom serialization function, and uses that to return a string representation of the object.

References

JSON.stringify also uses toJSON.

@hashtagchris hashtagchris requested a review from a team as a code owner May 8, 2025 15:11
@hashtagchris
Copy link
Contributor Author

hashtagchris commented May 8, 2025

Going to evaluate whether to always call toJSON if present, or just improve the serialization of instances of Date and URL specifically.

@hashtagchris hashtagchris marked this pull request as draft May 8, 2025 18:42
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.

1 participant