title: How can i store a formatted string in json
body: <p>I am trying to use a doc store which requires me to store my data in a valid json format. In my case one of the fields is the text of mail merge text which has single as well as double quotes and curly braces like the below example.</p>
  
  <pre><code>Hi {{ first_name | fallback: "there" }},
  
  I gave you a call for our scheduled appointment today but wasn't able to reach you. I'm still 
  happy to chat, so let's get a new time on the calendar. Send a few new times that work for you and I’ll give you a ring.
  
  Thanks,
  
  {{ my_first_name | fallback: "" }}
  </code></pre>
  
  <p>wondering if there is a function which can be used to escape the doc to make it valid json so it can be saved as well as turn it back into a plain string without escape char when i read it for processing.</p>