Skip to content

Incorrect rounding of float values when stringifying JSON #2

@rmariano

Description

@rmariano

The POJO/stringified representation of float values rounds up to integer when the decimal value is 0, so it doesn't preserve the original JSON

Input

{"foo": 0.0}

JSON stringify JavaScript object

"{\"foo\":0}"

Expected

"{\"foo\":0.0}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions