Closed
Bug 1266281
Opened 9 years ago
Closed 9 years ago
JSON.stringify() docs don't describe how to handle 'naked' values of undefined, function objects, or symbols
Categories
(Developer Documentation Graveyard :: JavaScript, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: niko.barry, Unassigned)
References
()
Details
:: Developer Documentation Request
Request Type: New Documentation
Gecko Version: unspecified
Technical Contact:
:: Details
The JSON.stringify() docs DO describe how to handle undefined, function objects, or symbols when they are in an array or object. But the documentation omits the behavior when a 'naked' un-stringifiable value is passed to JSON.stringify. (I'd update docs myself, but I'm getting a message that account creation is temporarily disabled while MDN updates its moderation guidelines.)
The relevant section of documentation currently says:
If undefined, a function, or a symbol is encountered during conversion it is either omitted (when it is found in an object) or censored to null (when it is found in an array).
It should be updated to say:
If undefined, a function, or a symbol is encountered during conversion it is either omitted (when it is found in an object), censored to null (when it is found in an array), or be result in a return value of undefined (when it is passed on its own to JSON.stringify()).
Comment 1•9 years ago
|
||
Updated!
Feel free to tweak this some more. Account creation on MDN is now possible again and your contribution would be welcome! Thanks for your bug report!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•