The JSON parser parses longs as ints, as in the example below. I have only checked java driver versions 2.6.5 and 2.7.3.
BasicDBObject test = new BasicDBObject();
test.put("num", new Long(-5312343143242334L));
System.out.println(JSON.serialize(test)); // ok
System.out.println(JSON.parse(JSON.serialize(test))); // error
{ "num" : -1174035038}- is duplicated by
-
JAVA-399 bad bson decode/encode
- Closed