title: How to encode JSON embedded within JSON
body: <p>I have a JSON string and one of the fields is a text field. This text field can contain text that a user enters in the UI and if the text they enter is JSON text, perhaps to illustrate some coding, I need to encode their text so that it does not get interpreted as JSON within the actual JSON structure sent to the server.</p>
  
  <p>When the JSON structure is received by the server and gets decoded, I need to make sure the embedded JSON gets decoded as text, which ends up looking like JSON in the UI.</p>
  
  <p>In effect, how do you escape an embedded JSON string?</p>