[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:
Depends
depends on SERVER-11867 In strict-json mode, represent Number... Closed
depends on SERVER-11136 Support json parsing of NumberLong/Int Closed
depends on SERVER-11957 Support NumberInt in extended JSON Closed
Related
related to JAVA-1280 In JsonWriter, support writing BSON I... Closed
is related to SERVER-3483 $timestamp extended json format for d... Closed
is related to DRIVERS-351 Implement Extended JSON Spec Implementing
is related to SERVER-5677 rewrite json parser Closed
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.

Generated at Thu Feb 08 03:12:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.