Brief bug description
When data is exported any fields that are set to undefined will not be present in the resulting JSON output.
Repro steps
- Export a content item that includes an empty field
- Ex: Non-required number element or text element
- Run the
export command
- See that the value field does not exist
Expected behavior
The value field has a value.
Test environment
N/A
Additional context
undefined is not a valid value per the JSON specification.
The import will gracefully handle a missing value field. Accessing data.value when value is missing still results in undefined.
However, this can cause issues when a user wishes to directly interact with the exported JSON, expecting the value field to exist. Also, values of 0 and an empty string will not be imported correct, resulting in incorrect migrations.
I believe the fix to this issue would be to use null instead of undefined to represent an empty field.
Screenshots

Brief bug description
When data is exported any fields that are set to
undefinedwill not be present in the resulting JSON output.Repro steps
exportcommandExpected behavior
The
valuefield has a value.Test environment
N/A
Additional context
undefinedis not a valid value per the JSON specification.The import will gracefully handle a missing
valuefield. Accessingdata.valuewhenvalueis missing still results inundefined.However, this can cause issues when a user wishes to directly interact with the exported JSON, expecting the
valuefield to exist. Also, values of 0 and an empty string will not be imported correct, resulting in incorrect migrations.I believe the fix to this issue would be to use
nullinstead ofundefinedto represent an empty field.Screenshots