[JAVA-1796] JSON.parse method doesn't support $type in $binary where type is a hexadecimal string Created: 04/May/15 Updated: 06/Feb/19 Resolved: 06/Dec/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | JSON |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.5.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | William Delanoue | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Case: | (copied to CRM) | ||||
| Description |
|
Hi, as discussed on https://groups.google.com/d/msg/mongodb-user/ihCV6zWzWlg/u7Q-AKxBEQEJ The old "Json" package doesn't support the Extended JSON : $type is not a String but an Integer You can reproduce the problem with : final Document document = new Document("test", new BsonBinary("test".getBytes())); and you got : } java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer ($type, as I understand, must be an Integer but Extended JSon ask for a String) |
| Comments |
| Comment by Githook User [ 06/Dec/16 ] |
|
Author: {u'username': u'tomdcsmith', u'name': u'tomdcsmith', u'email': u'tomdcsmith@users.noreply.github.com'}Message: Fix for JSONCallback to fully support extended binary Added support for hexadecimal string values for the `$type` field in binary data.
|
| Comment by Jeffrey Yemin [ 28/Nov/16 ] |
|
Pull request: https://github.com/mongodb/mongo-java-driver/pull/380 |