Open riodeuno opened 3 years ago
@riodeuno @Nikhil-Nandagopal : The real behaviour indeed is to set it to null. When the API executes, smart substitution ensures that null values are set correctly and the JSON sent out is valid. Do you mean that the client should display this ? @hetunandu : Is this possible in smart substitution to handle undefined as null values?
@trishaanand Yes. We should try to maintain the accuracy of the displayed evaluated values. If we're executing the API with the values substituted as null
we should show this in the evaluated values display.
Summary
Casting empty values appropriately and automatically can have a high impact when defining JSON payloads. Today, we need to write verbose ternary operations to cast them accordingly.
For example:
undefined
is considered incorrect in JSON, so we should have it automatically substituted tonull
during Smart JSON substitutionA screenshot of how verbose it is for users: