[JAVA-2905] JsonReader doesn't parse DBPointer in strict representation correctly Created: 11/Jul/18 Updated: 11/Feb/19 Resolved: 11/Feb/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | jin | Assignee: | Ross Lawley |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
Hi Experts, I am using JsonReader in Bson lib to parse the JSON in strict representation, but it looks like the DBPointer type is not correctly parsed, it parsed as DOCUMENT type. Attachment is a simple test program to reproduce this problem, can you please look at it and suggest me? Thank you very much! BTW. I am using bson-3.8.0.jar in the test. Regards, Jin |
| Comments |
| Comment by Jeffrey Yemin [ 26/Dec/18 ] |
|
Hi zhao. I agree it's low priority. I have never heard of a DBPointer actually used by anyone. To answer your questions:
|
| Comment by jin [ 20/Dec/18 ] |
|
Hi Ross, Sorry for my late response. What I am doing to try parse JSON output from mongoexport which is in strict mode to be used by our application, since we want to make it as general utility, so that we try to cover all supported types, that why BsonDbPointer type is included. If BsonDbPointer was deprecated for many years, maybe this problem is really low priority and probably can be ignored. I have questions for EXTEDNED JSON representation:
Thank you so much! Jin |
| Comment by Ross Lawley [ 13/Dec/18 ] |
|
Hi zhao, Apologies for the lack of feedback on this ticket. I have been working on a fix but before I commit it, I'd like to understand a little more about your usecase specifically:
The reasons for the questions are due to the fix. It would change how a BsonDbPointer is encoded into json, so that it matches the EXTENDED spec rather than following the DBRef convention. Many thanks, Ross |