mdedetrich / scalajson

ScalaJSON - JSON for Scala, currently contains minimal AST
BSD 3-Clause "New" or "Revised" License
55 stars 10 forks source link

JNumber constructor accepts Float.NaN #21

Closed Ichoran closed 7 years ago

Ichoran commented 7 years ago

Float should be handled the same way as Double.

mdedetrich commented 7 years ago

Are you talking about unsafe?

Ichoran commented 7 years ago

No, the normal one just blithely calls .toString, which then throws an exception on NaN. This is different behavior than Double, which gives JNull instead.

mdedetrich commented 7 years ago

Ah yes, I see, thanks will look into it