-
Type: New Feature
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.11.3
-
Component/s: Codecs
-
Labels:None
-
Environment:rhino 1.7R5
For this object (note "when" field):
var o = { "_id" : id, "when" : new Date(), "name" : "MongoDB" + 'def', "type" : "database", "count" : 1, "info" : { x : 203, y : 102 } };
This call:
new BasicDBObject(o);
Throws the following error:
org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: can't serialize class org.mozilla.javascript.NativeDate
There was a similar issue with ConsString that was fixed in the latest driver build. The "name" field above should cause the ConsString instance to be passed to the function, which works. It did not in previous version of the driver.
A fix for this would be awesome.