You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JSON built in currently has a few issues that are thankfully easy to fix.Currently the JSON.stringify and JSON.parse are undefined and expect you to specify the JSON builtin's prototype.
The second issue is that the function JSON.stringify(accessed through JSON.prototype.stringify) returns unexpected output.
Example:
JSON.prototype.stringify({number: 1})// Currently evaluates to "{ "extensible": true }"
This issue seems to be caused by this line using the internal_slots instead of the object's properties.
If you want I could submit a PR to fix these issues.
The text was updated successfully, but these errors were encountered:
Yes please @vlakreeh i don't know why its iterating through internal slots there instead of properties, seems odd. Looks like a change i made but not sure why i did that.
I think the JSON builtin needs some tests similar to the others
And yes you can just point prototype to Object.prototype
The JSON built in currently has a few issues that are thankfully easy to fix.Currently the
JSON.stringify
andJSON.parse
are undefined and expect you to specify theJSON
builtin's prototype.The second issue is that the function
JSON.stringify
(accessed throughJSON.prototype.stringify
) returns unexpected output.Example:
This issue seems to be caused by this line using the
internal_slots
instead of the object's properties.If you want I could submit a PR to fix these issues.
The text was updated successfully, but these errors were encountered: