[COMPASS-7431] Importing $numberDouble json with a number that's an integer makes it int32 Created: 08/Nov/23 Updated: 18/Dec/23 Resolved: 18/Dec/23 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Import/Export |
| Affects Version/s: | 1.40.4 |
| Fix Version/s: | 1.41.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rhys Howell | Assignee: | Le Roux Bodenstein |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: |
||
| Attachments: |
|
| Story Points: | 2 |
| Documentation Changes: | Not Needed |
| Description |
|
Example doc to import (json file with this attached): }] Results in Int32 type: Probably needs a `promoteValues: false` in the ejson deserialize: https://github.com/mongodb-js/compass/blob/50b2b2966e1eae0c92a60877f40a5e94624cec14/packages/compass-import-export/src/import/import-json.ts#L81 |
| Comments |
| Comment by Githook User [ 13/Nov/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: fix: pass relaxed: false to EJSON.deserialize() so values won't be promoted pass relaxed: false to EJSON.deserialize |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: fix: pass relaxed: false to EJSON.deserialize() so values won't be promoted pass relaxed: false to EJSON.deserialize |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: fix: pass relaxed: false to EJSON.deserialize() so values won't be promoted pass relaxed: false to EJSON.deserialize |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: fix: pass relaxed: false to EJSON.deserialize() so values won't be promoted pass relaxed: false to EJSON.deserialize |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: fix: pass relaxed: false to EJSON.deserialize() so values won't be promoted pass relaxed: false to EJSON.deserialize |
| Comment by Le Roux Bodenstein [ 09/Nov/23 ] |
|
Extended JSON parsing does not support promoteValues: false. It is always the equivalent of promoteValues: true |