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

fix: improve solution for handling circular json #1222

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Oct 14, 2024

  • Don't remove repeated objects from json when stringifying
  • Replace circular ref with [Circular ~] instead of removing key altogether

Solution taken directly from json-stringify-safe. We can use it directly but it hasn't been updated in over 9 years (although it's still widely used with 23 million weekly downloads)

@mdonnalley mdonnalley merged commit 9073052 into main Oct 15, 2024
86 checks passed
@mdonnalley mdonnalley deleted the mdonnalley/better-circular-json branch October 15, 2024 14: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