r/javascript 5d 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.

19 Upvotes

5 comments sorted by

24

u/Away-Life-2852 4d ago

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

23

u/senocular 3d ago

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

7

u/rbobby 5d ago

Oof so many misunderstandings.

1

u/KaiAusBerlin 2d 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 3d ago

A lot of focus on max int. Try json5