Technically, JSON enforces a specific numeric precision by enforcing that numbers are stored as JS-compatible floating point numbers with its associated precision.
Other than that, the best way to go if you want to have a specific precision is to cast to string before serialisation.
Technically, JSON enforces a specific numeric precision by enforcing that numbers are stored as JS-compatible floating point numbers with its associated precision.
Other than that, the best way to go if you want to have a specific precision is to cast to string before serialisation.