• squaresinger@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    16 hours 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.