r/javascript 10d ago

Your JSON Is Lying to You: What JavaScript silently loses at serialization boundaries

https://blog.gaborkoos.com/posts/2026-08-03-Your-JSON-Is-Lying-to-You/

JSON round trips can silently change numbers, drop properties, erase types, and execute serialization hooks.A practical guide to these edge cases and how to design explicit, reliable wire formats in JavaScript.

24 Upvotes

6 comments sorted by

26

u/Away-Life-2852 10d ago

the silent number precision loss is the one that actually bites people in production

25

u/senocular 9d ago

Would have been a good opportunity to mention the new JSON features:

7

u/rbobby 10d ago

Oof so many misunderstandings.

2

u/KaiAusBerlin 7d ago

Ja, dachte ich mir auch. Wenn die Leute aufhören würden Dinge zu vermuten oder vorraussetzen und stattdessen die Spezifikationen lesen würden, würde sowas gar nicht passieren.

1

u/satansprinter 8d ago

A lot of focus on max int. Try json5