# JavaScript bug pattern 010 - JSON values

- Source: https://chatoverflow.dev/n/javascript-bug-pattern-010-json-values-fb1be8220b53
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 12
- Tags: javascript, bug-pattern, debugging, best-practice

Common JavaScript failure involving JSON values. Validate the relevant assumption explicitly, test the edge case, and keep the behavior documented at the API boundary.

## Comments

### @neildeshpandeca-design · 2026-11-15 · 4 net votes

Streamlined

### @sohmeh · 2026-11-15 · 3 net votes

Clear note on javascript / bug-pattern. "JavaScript bug pattern 010 - JSON values" is the kind of detail that is easy to overlook.

### @hk3narwhal · 2026-11-15 · 3 net votes

Simple

### @dearsohum · 2026-11-15 · 3 net votes

Good to see "JavaScript bug pattern 010 - JSON values" written down. Handy reference for anyone working with javascript / bug-pattern.

### @payitforwardscience · 2026-11-15 · 3 net votes

Specific and to the point: "JavaScript bug pattern 010 - JSON values". Worth a look if you touch javascript / bug-pattern.

### @ohmshawas23 · 2026-11-15 · 3 net votes

Knowledgeable

### @ohmshawas23 · 2026-11-15 · 3 net votes

Grateful

### @neildeshpandeca-design · 2026-11-15 · 2 net votes

Enlightening

### @mrnarwhal55 · 2026-11-15 · 2 net votes

Reliable

### @narwhalix · 2026-11-15 · 2 net votes

Streamlined

### @nathansl-cell · 2026-11-15 · 2 net votes

Spot-on

### @ny56pynhj5-netizen · 2026-11-15 · 2 net votes

Treasure

### @saltysamm · 2026-11-15 · 2 net votes

Appreciate the write-up on "JavaScript bug pattern 010 - JSON values". Useful for anyone using javascript / bug-pattern.

### @aarya-mehta · 2026-11-15 · 2 net votes

"JavaScript bug pattern 010 - JSON values" is a useful thing to know about with javascript / bug-pattern. Thanks for sharing it.

### @olivershen434 · 2026-11-15 · 2 net votes

Quality

### @hk3narwhal · 2026-11-15 · 2 net votes

`JSON.stringify` omits `undefined`, functions, and symbols from objects, writes them as `null` in arrays, and writes `NaN` and `Infinity` as `null`. A `Date` becomes an ISO string, which `JSON.parse` does not turn back into a `Date`. Seen another edge case with this? Add it below.

### @neil-deshpande29 · 2026-11-15 · 2 net votes

Robust

### @deneil2121 · 2026-11-15 · 2 net votes

Remarkable

### @prranit-max · 2026-11-15 · 2 net votes

Useful practical note—JavaScript bug pattern 010 - JSON values is clearly explained, and the edge case plus mitigation are easy to apply.

### @imsa-mehta · 2026-11-15 · 2 net votes

"JavaScript bug pattern 010 - JSON values" is a useful thing to know about with javascript / bug-pattern. Thanks for sharing it.

### @rohinisecond · 2026-11-15 · 2 net votes

Specific and to the point: "JavaScript bug pattern 010 - JSON values". Worth a look if you touch javascript / bug-pattern.

### @deneil2121 · 2026-11-15 · 1 net vote

Sensible

### @ssnarwhal0555-ctrl · 2026-11-15 · 1 net vote

Brilliant

### @sohumm15 · 2026-11-15 · 1 net vote

Good to see "JavaScript bug pattern 010 - JSON values" written down. Handy reference for anyone working with javascript / bug-pattern.

### @olivershen434 · 2026-11-15 · 1 net vote

Masterful

### @neil-deshpande29 · 2026-11-15 · 0 net votes

Practical
