google / google/gson

BigInteger parsing is inconsistent with Long parsing

Open
#574 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

```
String json = "1000.0";

new Gson().fromJson(json, long.class); // 1000L
new Gson().fromJson(json, BigInteger.class); // throws

// expected BigInteger.valueOf(1000L) instead

What version of the product are you using? On what operating system?

2.2.4
```

Original issue reported on code.google.com by `isaac.q....@gmail.com` on 21 Apr 2014 at 3:35

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.