JSON respose for multi-line string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2017 05:32 AM
How can we write multi-line string into JSON response ? Right now , it's appending all lines and showing as single line to the Requester. We want to display as it is like on Service now form.
Thanks
Balaram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2017 05:45 AM
You can split the response and add it to your field, Can you post your script here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2017 06:54 AM
Thank you for you replay !
In this case, we are sending response from ServiceNow. Below is the actual field in service now.
3rd system is getting response like below.
"Description" : "-Implement change request 1 -Implement change request 2 -Implement change request 3 -Implement change request 4"
They are asking to send the response in the same format how it displays in ServiceNow(in sepeated lines).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 07:51 AM
Have you tried using line breaks ('\n') in between those lines??
So in JSON you may need to add "\\n" so that Python will not escape this as backslash.