# ravionhq/superjson

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

Repository: https://github.com/ravionhq/superjson
Canonical: https://ross.abutalabs.com/products/superjson
Homepage: https://www.ravion.com?ref=superjson
Language: TypeScript
License: MIT
License Family: permissive
Topics: superjson, javascript, json, blitzjs, hacktoberfest
Last push: 2026-06-18T13:56:42+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 88, release rhythm 30, longevity 100
- inputs: {"age_days": 4264, "days_push": 76, "days_rel": 309, "gap_med": 163.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5280, forks 126 (observed 2026-08-28T04:09:14.151848+00:00)

## What it is
Superjson is a TypeScript library that safely serializes and deserializes JavaScript values to a superset of JSON, preserving types like Date, Map, Set, and BigInt that JSON.stringify drops. It is a thin, framework-agnostic wrapper around JSON.stringify/JSON.parse with type-safe autocompletion.

## Use cases
- serialize dates and bigints to json
- pass Date objects through Next.js getServerSideProps
- serialize Map and Set to JSON
- fix JSON.stringify losing types
- type-safe json serialization in typescript
- send rich objects over an api without manual conversion

## When to choose
- you need Date, Map, Set, BigInt, or RegExp to survive JSON round-trips
- you hit Next.js serialization limits in getServerSideProps or getInitialProps
- you want a drop-in JSON.stringify replacement with a tiny runtime footprint

## When to avoid
- your data is plain JSON-compatible types only
- you need a wire format other systems can read without the superjson meta layer
- you need binary or extremely large payload optimization

## Facets
- artifact type: library
- maturity: active
- function: serialization, json
- domain: developer-tools, web-development, backend
- platform: cross-platform
- tags: json-superset, date-serialization, bigint, nextjs, typescript, nodejs

## Member repositories
- ravionhq/superjson (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:14.151848+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:59:17.215871+00:00, confidence not recorded.
  - readme: https://github.com/ravionhq/superjson (fetched 2026-08-28T04:09:14.151848+00:00, sha ede33b53597c)
  - homepage: https://www.ravion.com?ref=superjson (fetched 2026-08-29T08:54:39.394873+00:00, sha a7bf39f63d5e)
  - site_page: https://www.ravion.com/docs/module-definitions/standard-library (fetched 2026-08-29T08:54:39.419773+00:00, sha 6b9a21c20e79)
  - site_page: https://www.ravion.com/docs (fetched 2026-08-29T08:54:39.404255+00:00, sha f2202cc6f7db)
  - site_page: https://www.ravion.com/docs/module-definitions/catalog/rvn-ecs-web (fetched 2026-08-29T08:54:39.408262+00:00, sha 3437560c09ae)
  - site_page: https://www.ravion.com/docs/module-definitions/catalog/rvn-ec2-service (fetched 2026-08-29T08:54:39.410990+00:00, sha 60a1127c28a5)
  - site_page: https://www.ravion.com/docs/module-definitions/catalog/rvn-aws-alb (fetched 2026-08-29T08:54:39.413885+00:00, sha 3bbcc0bd8879)
  - site_page: https://www.ravion.com/docs/modules/stack (fetched 2026-08-29T08:54:39.415656+00:00, sha f3c044a9f72c)
  - site_page: https://www.ravion.com/docs/philosophy (fetched 2026-08-29T08:54:39.417796+00:00, sha 604216708b93)
  - site_page: https://www.ravion.com/pricing (fetched 2026-08-29T08:54:39.406130+00:00, sha ead0f61ddd59)
- Data as of 2026-08-30T08:39:29.467469+00:00.
