You have created a new record type whose data source comes from an integration. The integration's response body includes a definition key, which consists of a nested array of key-value pairs. Not all keys are used, and the nested array can be of varying length.
You have decided that the BEST way to store definition inside the record type is as a JSON string, using a!toJson() in the record source expression. The record type syncs successfully.
You use a!fromJson() when you need to convert the JSON string back to an array, but this method does not work consistently. Sometimes, a!fromJson() returns the following expression evaluation error:
“The jsonText parameter was not valid JSON.”
You have verified that the integration itself consistently returns valid JSON.
What is the source of this error?