Problem Statement/Rationale
Importing a JSON file that looks like this (with empty objects: "fr": {}, "it": {}) via the Compass Add Data -> Import File UI
[
|
{
|
"_id": {
|
"$oid": "62e39685cc234a6c40cf3435"
|
},
|
"key": "productcreator.fields.renderjob.group",
|
"namespace": "default",
|
"__v": 0,
|
"created": {
|
"$numberLong": "1659082373113"
|
},
|
"lastUpdated": {
|
"$numberLong": "1659082373113"
|
},
|
"locales": {
|
"de": {
|
"default": "Gruppe"
|
},
|
"en": {
|
"default": "Group"
|
},
|
"fr": {},
|
"it": {}
|
}
|
}
|
]
|
will import it like (Objects for "de": {"default": "Gruppe"},"en": {"default": "Group"}, are missing)

Steps to Reproduce
Import the localesnotworking.json via the Compass Add Data -> Import File UI
localesnotworking.json
Expected Results
Import it like this:

Actual Results
is imported like this: (Objects for "de": {"default": "Gruppe"},"en": {"default": "Group"}, are missing)

Additional Notes
We are regularly exporting data from one Cluster to another, we use the export collection feature with a filter in the Compass UI, and are importing it again in the target cluster with the Add Data feature.
This behavior does not occur when we import a document that does not include empty objects:
[
|
{
|
"_id": {
|
"$oid": "62e39685cc234a6c40cf3435"
|
},
|
"key": "productcreator.fields.renderjob.group",
|
"namespace": "default",
|
"__v": 0,
|
"created": {
|
"$numberLong": "1659082373113"
|
},
|
"lastUpdated": {
|
"$numberLong": "1659082373113"
|
},
|
"locales": {
|
"de": {
|
"default": "Gruppe"
|
},
|
"en": {
|
"default": "Group"
|
},
|
"fr": {
|
"default": "Group"
|
},
|
"it": {
|
"default": "Group"
|
}
|
}
|
}
|
]
|
|