playframework/Play20 — pull request #1239 by jroper (2013-06-24 20:12:34+00:00)
Title: JSON BigDecimal precision loss when parsing

I'm using a locally built snapshot (today's master branch) of Play-Json, I have the following problem:

```
fred@fred:~/play/framework$ sbt
[info] Loading project definition from /home/fred/play/framework/project
[info] Set current project to Root (in build file:/home/fred/play/framework/)
> project Play-Json
[info] Set current project to Play-Json (in build file:/home/fred/play/framework/)
> console
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.0 (OpenJDK 64-Bit Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import play.api.libs.json._
import play.api.libs.json._

scala> val bd = BigDecimal(Long.MaxValue) * BigDecimal("1234.5678901")
bd: scala.math.BigDecimal = 11386878955147140008156.5148107

scala> println(Json.parse(Json.toJson(bd).toString()) == Json.toJson(bd))
false

scala> println(Json.parse(Json.toJson(bd).toString).toString == Json.toJson(bd).toString)
false

scala> println(Json.toJson(bd))
11386878955147140008156.5148107

scala> println(Json.parse(Json.toJson(bd).toString))
1.1386878955147141E+22

```
I'm expecting true and true, but get false and false, then the 2 println clearly illustrate that parsing BigDecimal leads to a precision loss.