Jump to content

JSON file errors

Recommended Posts

When outputting via JSON the carriage returns are being shown as new lines breaks, we would like new lines to be sent as \n

How do you change the output, we have tried using different field values e.g. field_3 and field_3_value and both appear to output the same

What we get:


What we want


Link to comment
Share on other sites

@Jeremy could be the case the code behind the node does not "interpret" escape characters, so it displays them as raw values, while it formattes the new lines... there isn't any way to alter how the output param value is returned on this node... and unlikely this functionality (node) will be amended given that a) it's an experimental functionality and b) will be at some point deprecated and removed...


Link to comment
Share on other sites

Hi @Jeremy,

Apologies for the late response on this.

There's a utility node to escape strings ready to be inserted into JSON, this is what you need to use on the field in question before using the result of this node in your JSON:



So without pushing the description through this node, and adding it in its vanilla state to the JSON, your output is (as you have seen):



But preparing the string with the workflow utility before adding it to your JSON, and you get the desired result:


Let me know if this helps.



  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...