[JAVA-2022] JsonReader does not accept ISODate() Created: 28/Oct/15 Updated: 07/Dec/15 Resolved: 30/Oct/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | 3.2.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Patrick Suter | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Hi The org.bson.json.JsonReader does not accept fields with ISODate() as content for a current date. Since this is possible in the shell and the JsonReader already accepts Date() as input it would be nice if ISODate() would share the same behaviour. Or am i missing something? In visitDateTimeConstructor() this case is already handled like this:
Thanks for looking into this! |
| Comments |
| Comment by Jeffrey Yemin [ 07/Dec/15 ] | ||||||||||||||
|
The 3.2.0 driver, which contains a fix for this issue, has been released today. | ||||||||||||||
| Comment by Githook User [ 29/Oct/15 ] | ||||||||||||||
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Add Json support for new ISODate()
| ||||||||||||||
| Comment by Patrick Suter [ 28/Oct/15 ] | ||||||||||||||
|
Of course here is the simplest example i could make:
The first decode() works as intended and creates a BsonDateTime Object with the current timestamp.
or in the style of your tests:
| ||||||||||||||
| Comment by Jeffrey Yemin [ 28/Oct/15 ] | ||||||||||||||
|
Hi Patrick, If possible, please provide a code snippet that reproduces the issue. We have a couple of tests for ISODate, and I'm wondering what's different in your scenario. |