Escaping special characters and building a JSON string from a dictionary

I’m building an app which forwards SMS messages to an API, and the API expects a JSON text string. (I’m using the built-in Texting component.) But I cant seem to 1) escape text properly in Kodular, it just didn’t work to replace the newline character with a \n, I’ve tried whatever type of chars I can think of, including a linefeed, and 2) I want to be able to build my payload as a dictionary and then turn it (which’ll have nested dictionaries and lists inside) into a properly escaped JSON text string. I couldn’t build the block structure myself (which I couldn’t do anyways because of the illegal characters), maybe someone knows of an extension which can handle this?

Hi dear,

Welcome to the Kodular community!

Have you tried using Activity Starter / Extensions? Maybe the Texting component is not sending the message correctly.

What problems did you encounter when creating the dictionaries/lists?

1 Like

I’m very sorry to have wasted your time! Actually the Show Lists As JSON option worked fine, I am able to put the dictionary directly into the web1.post text. The issue wasn’t escaping characters, the issue was my code blocks; I had made some pretty basic mistakes. Thank you for the accepting me into the community, you were kind for offering to help!

No, don’t worry about it, the important thing is that you solved it.
I wish you a great day dear.