[SERVER-6812] Extended JSON syntax should support all BSON types Created: 21/Aug/12 Updated: 25/Oct/21 Resolved: 25/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Tools |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Richard Kreuter (Inactive) | Assignee: | Geert Bosch |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Description |
|
It's not clear exactly what Extended JSON syntax is meant to be used for, but if anyone is trying to use it for backup or archiving purposes, they might reasonably care about preserving numeric type information (e.g., float/int32/int64 distinction), as well as any other BSON type we choose to introduce. If we were to do this, I guess mongoexport should have a flag for whether to represent integers in JSON syntax (lossy, but backward compatible and better for interoperability with other JSON tools), or in Extended JSON syntax. I suppose the same consideration would apply to the symbol type, though probably nobody uses that. |
| Comments |
| Comment by Richard Kreuter (Inactive) [ 24/Mar/17 ] |
|
(Assuming I remain the submitter with whom someone is supposed to debug...) At the time this issue was created, extended JSON was just mongoexport & mongoimport's underspecified private argot, so the intent of this issue was more "mongoexport and mongoimport ought to support lossless roundtripping through files". I don't know if that's true nowadays, but I still think it'd be a fine idea. If you want to close this issue, that's fine by me. If you want to treat this issue as a design constraint on the extended JSON spec, that's also fine, but otiose. |
| Comment by Bernie Hackett [ 24/Mar/17 ] |
|
For reference, the extended JSON spec - https://github.com/mongodb/specifications/blob/master/source/extended-json.rst |
| Comment by Richard Kreuter (Inactive) [ 21/Aug/12 ] |
|
If the JSON parser is responsible for processing Extended JSON into BSON, then this would affect it, too. |