-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.7.3
-
Component/s: None
-
None
-
Environment:Java 6 on Mac OS X 10.7.3 (Lion)
-
Minor Change
When trying to JSON.parse() the following String, we get a NumberFormatException. Presumably this is because the number is larger than java.lang.Long.MAX_VALUE.
{
"_id":
,
"foo": 109997115319321890123
}
java.lang.NumberFormatException: For input string: "109997115319321890123"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:422)
at java.lang.Long.valueOf(Long.java:525)
at com.mongodb.util.JSONParser.parseNumber(JSON.java:636)
at com.mongodb.util.JSONParser.parse(JSON.java:370)
at com.mongodb.util.JSONParser.parseObject(JSON.java:414)
at com.mongodb.util.JSONParser.parse(JSON.java:378)
at com.mongodb.util.JSONParser.parse(JSON.java:328)
at com.mongodb.util.JSON.parse(JSON.java:287)