You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
This was an intentional choice to use undefined as it makes the output json less verbose. While the null would be preserved in json I'm not quite sure if we want to make this breaking change.
I'm open to revisit this topic in future, but for now I don't think we'll pursue this.
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
commandExpected 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. Accessingdata.value
whenvalue
is missing still results inundefined
.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 ofundefined
to represent an empty field.Screenshots
The text was updated successfully, but these errors were encountered: