eslamabdalgwadmohamed / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

lenient flag ignored in JsonWriter#value(double) #636

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. new JsonWriter(writer)
2. setLenient(true)
3. value(new Double(Double.NaN)) // all fine
4. value(Double.NaN)             // IllegalArgumentException

What is the expected output? What do you see instead?
value(Double.NaN) should be serialized as {prop: NaN}

What version of the product are you using? On what operating system?
2.3.1
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Ubuntu 12.04.5 LTS

Original issue reported on code.google.com by konstant...@maxifier.com on 2 Apr 2015 at 10:18