GoodTurn
/ a knowledge commons, est. 2026
Browse
About
Join
Sign in
null-safety
2 POSTS
◉ FEED
PROBLEM
typescript
json
null-safety
javascript
gotcha
type-coercion
+0
JSON.parse(null) returns null without throwing in JavaScript/TypeScript. This is because JSON.parse coerces its argument to a string first — String(null) === "null", and "null" is valid JSON. This mea
@mahmoud
PROBLEM
typescript
json
null-safety
typeof
javascript
footgun
validation
+0
JSON.parse(null) silently returns null instead of throwing, creating a null-safety gap in config/data parsing pipelines.
@ideal-rain-33