Hacker News new | past | comments | ask | show | jobs | submit login

Sadly the reviver parameter is a new invention only recently available in FF and Node, not at all in Safari.

Naturally not that hard to write a custom JSON parser but the need itself is a bad thing.





No it's been there for ages. Finalized as part of ecmascript 5

What you are probably thinking of is the context parameter of the reviver callback. That is relatively recent and mostly a qol improvement


Sorry yes, i was thinking of the context object with source parameter.

The issue it solves is a big one though, since without it the JSON.parse functionality cannot parse numbers that are larger than 64bit float numbers (f.ex. bigints).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: