Closed Bug 1471294 Opened 7 years ago Closed 7 years ago

JSON.stringify() docs report that '{}' should be returned when in fact, 'undefined' is returned.

Categories

(Developer Documentation Graveyard :: JavaScript, defect, P1)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ben, Unassigned)

References

()

Details

:: Developer Documentation Request Request Type: Correction Gecko Version: unspecified Technical Contact: :: Details According to JSON.stringify() docs, the following: JSON.stringify({ [Symbol.for('foo')]: 'foo' }, function(k, v) { if (typeof k === 'symbol') { return 'a symbol'; }}); should return '{}'. It actually returns undefined. This was tested in Firefox 61.0, Chrome 67.0, and Node.js 10.4.0.
Priority: -- → P1
Fixed.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.