[COMPASS-6708] semi-relaxed EJSON in exportJSON Created: 07/Apr/23  Updated: 24/Apr/23  Resolved: 18/Apr/23

Status: Closed
Project: Compass
Component/s: Import/Export
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Le Roux Bodenstein Assignee: Le Roux Bodenstein
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: COMPASS-5576
Story Points: 2
Documentation Changes: Not Needed
Sprint: Iteration Zebrafish

 Description   

relaxed: true breaks big long numbers. ie. 123456789123456784 becomes 123456789123456780

relaxed: false is extreme in that it does the equivalent of '

{"$numberLong":"9223372036854775807"}

' for every number including int32 or double.

compass does "semi-relaxed" which only uses the verbose format if the number would change when output. We should do the same in export.

I'd actually argue we shouldn't have relaxed: true as an option because it breaks data. Although maybe some users would rather want that than have to deal with $numberLong?

There might have also been something to do with dates. To be investigated..



 Comments   
Comment by Githook User [ 24/Apr/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(export): Map default to our semi-relaxed / compass EJSON style, test with all bson types COMPASS-6708 (#4253)

Map default to our semi-relaxed / compass EJSON style, test with all json types
Branch: COMPASS-6530-auto-add-curly-braces
https://github.com/mongodb-js/compass/commit/16c98ed0c601c93540dec048e3d71cb19771ff47

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(export): Map default to our semi-relaxed / compass EJSON style, test with all bson types COMPASS-6708 (#4253)

Map default to our semi-relaxed / compass EJSON style, test with all json types
Branch: 1.36-releases
https://github.com/mongodb-js/compass/commit/16c98ed0c601c93540dec048e3d71cb19771ff47

Comment by Githook User [ 17/Apr/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(export): Map default to our semi-relaxed / compass EJSON style, test with all bson types COMPASS-6708 (#4253)

Map default to our semi-relaxed / compass EJSON style, test with all json types
Branch: main
https://github.com/mongodb-js/compass/commit/16c98ed0c601c93540dec048e3d71cb19771ff47

Generated at Wed Feb 07 22:44:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.