Skip to content

BigDecimal support #812

@dinee432

Description

@dinee432

How do I specify to use bigdecimal to handle numbers in gson? Below is the sample code and sample json string that I am trying to convert to a map.

`Type type = new TypeToken<Map<String, Object>>() { }.getType();
  Map<String, Object> data = new Gson().fromJson(strInput, type);`

Sample Json string :

[{
"Type":"Test",
"Amount":100231212111.00,
}]

The result I am getting is a map with double value for Amount. Please help to resolve this issue

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