News for hackers. Stuff that matters.
Re:A love letter to the CSV format by whizzter on Thursday March 27, 2025 @09:44AM (#43493598)
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.

Re:A love letter to the CSV format by hajile on Thursday March 27, 2025 @09:56AM (#43493720)
Re:A love letter to the CSV format by arnorhs on Thursday March 27, 2025 @03:05PM (#43496928)
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

Re:A love letter to the CSV format by whizzter on Thursday March 27, 2025 @04:59PM (#43498098)
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).