[GODRIVER-1512] Legacy $regex extended JSON not parsed Created: 03/Mar/20 Updated: 30/Mar/22 |
|
| Status: | Backlog |
| Project: | Go Driver |
| Component/s: | JSON & ExtJSON |
| Affects Version/s: | 1.3.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Golden | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | Improve JSON & ExtJSON Implementation |
| Description |
|
The driver fails to parse the legacy regular expression type of this document:
Output (hex form):
Other examples:
|
| Comments |
| Comment by Divjot Arora (Inactive) [ 17/Mar/20 ] | ||
|
Thanks for the information. I was under the impression that we don't support the legacy binary format, but I found the special-cased code to add support for it. Given that, I agree this ticket makes sense. EDIT: Moving from "Investigating" to the backlog to concentrate on other things for the 1.3.2 and 1.4.0 releases. | ||
| Comment by David Golden [ 17/Mar/20 ] | ||
|
The legacy $binary format is already supported by the driver:
Similarly, in I think the driver shouldn't selectively support legacy types, as that's going to lead to user confusion. | ||
| Comment by Divjot Arora (Inactive) [ 17/Mar/20 ] | ||
|
david.golden My understanding is that the driver's extjson library does not support the legacy format and we don't have plans to support it right now. The extjson spec also says "A parser MAY also accept strings that adhere to other formats, such as Legacy Extended JSON formats emitted by old versions of mongoexport or other tools, but only if explicitly configured to do so." Given that, adding support for the legacy format would require adding another variable or function for users to opt into it. Am I missing something? |