you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 year ago

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.

  • source
  • parent