November 14, 2025
JSON wars: Codables vs. the eye-rolls
Codables – Swift-inspired, declarative JSON serialization
Swift-style JSON tool drops — commenters debate “Do we really need another one” and nitpick the title
TLDR: CodableJSON promises Swift-like decorators to safely save and restore complex TypeScript data, claiming big speed gains over SuperJSON. Commenters question the need for yet another tool while nitpicking the title (“Show HN,” “for TypeScript”)—proof that marketing sparked more heat than benchmarks.
A new TypeScript toy just crash‑landed: Codables/CodableJSON, a Swift‑inspired way to save and restore complex app data without tears. It promises to tag tricky stuff like dates, sets, maps, even giant numbers, so they come back exactly as they were, with zero extra dependencies and a bite‑size bundle. The dev claims it’s about 3x faster than SuperJSON and uses decorators so you mark “what to save,” not “how.” Sounds neat… and immediately triggered the classic chorus: the top reaction is basically, “Why another JSON gizmo?” The author shoots back that when your data is a tangled hairball of classes and cross‑references, you need something sturdier than duct tape.
Then the thread swerved into peak meta‑drama: one person scolded the headline for not being a proper “Show HN” (Hacker News’ demo tag), another begged to add “for TypeScript” so people stop guessing. Meanwhile, performance skeptics joked that “3x faster” is the new “trust me, bro,” while fans of Swift’s Codable cheered the “mark what, not how” approach. The meme energy? “Not another JSON lib speedrun,” “Serialize my deadlines next,” and a quiet, grudging respect for the no‑dependency, test‑heavy vibe. Tech aside, the real fight was marketing 101 versus maker energy—and everyone had an opinion.
Key Points
- •CodableJSON is a declarative JSON serializer for JavaScript/TypeScript using modern decorators.
- •It extends JSON to handle types like Date, BigInt, Set, Map, RegExp, URL, URLSearchParams, Error, undefined, typed arrays, and special numbers.
- •Encoding performance is ~3–3.5x faster than SuperJSON; decoding is comparable or faster.
- •The library is zero-dependency (7.3KB gzipped), type-safe, framework agnostic, and well tested.
- •Declarative class serialization preserves types, references, and circular dependencies; classes should have memberwise constructors.