ravionhq/superjson

Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 46 minutes ago
Added to GitGenius on September 12th, 2026
Created on December 30th, 2014
Open Issues & Pull Requests: 47 (+0)
GitHub issues: Enabled
Number of forks: 126
Total Stargazers: 5,278 (+0)
Total Subscribers: 10 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 6.2 hours
Mean response time: 37.9 hours
90th percentile: 5.5 days
Tracked items: 27

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 7% of issues opened in the past year have been closed. Three people close 100% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 11
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 734 days
Stale 30+ days: 11
Stale 90+ days: 11

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • hacktoberfest (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Superjson is a serialization library that safely converts JavaScript expressions to a superset of JSON, extending standard JSON to include Dates, BigInts, Maps, Sets, and other types that the native JSON API cannot handle.

The problem it solves is the friction developers encounter when working with JavaScript objects that fall outside JSON's limited type system. Standard JSON.stringify silently converts or drops these types, forcing manual workarounds. Superjson wraps JSON.stringify and JSON.parse with automatic type preservation, allowing you to serialize complex objects and deserialize them back to their original form without data loss or explicit conversion logic.

Superjson suits any JavaScript project that needs to transmit or store objects with non-JSON-native types. It is particularly valuable in Next.js applications, where getServerSideProps, getInitialProps, and getStaticProps enforce JSON serialization and would otherwise reject Date objects and similar types. The library is framework-agnostic and introduces negligible runtime overhead. For developers choosing between approaches, the README identifies Next.js serialization limitations as a primary use case and mentions an experimental SWC plugin option for Next.js v13 and above, alongside a stable Babel transform for earlier versions.

The project maintains active development with reliable test coverage and continuous integration. The codebase is written in TypeScript, providing type safety and autocompletion for users. The tool has attracted contributions from multiple developers and maintains a public sponsorship model. Development activity shows consistent attention to code quality and framework compatibility, particularly around Next.js integration patterns.