Value is not valid JSON

I need the user to validate the text generated by an AI model so that it can move on to the next step of the process/form, but I get this error when trying to fill in the form field with the previous value.

Value is not valid JSON

From what I’ve seen, the values ​​are coming in ok, but I get an error when trying to fill in the form fields.

Follow a sample values in JSON:

“fields”: [
{
“name”: “titulo”,
“type”: “string”,
“defaultValue”: “={{ $json.titulo }}”,
“label”: “Título do post”
},

1 Like

Hi @Alberto_Messias ,

Is there a sample workflow you can upload?

Best,

Robert

Hi @Alberto_Messias,

use JSON.stringify() in your expression,

for example:

"defaultValue": {{ JSON.stringify( $json.titulo ) }},

Thank you. But the error continue.

Can you screenshot the JSON instead of copy and paste? Want to check formatting.