Skip to content

Numbers deserialization using gson #771

Open
@patton73

Description

@patton73

Starting from this issue #616

I can say that :

this bug was closed in Gson library with this PR google/gson#1290 merged in version 2.9.0 of GSON library. Right now the right way to have numbers parsed correctly is to configure the gson() in this way.

Gson gson = new GsonBuilder().setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE).create();

I suggest to make a new release that relay on latest gson release (right now is 2.10.1). And to close the bug adding this line to the gson builder.

Thanks.
Andrea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions