title: Decoding multiline string in JSON file using json_decode()
body: <p>I'm new to JSON so having some trouble parsing it.</p>
  
  <p>I made a JSON file:</p>
  
  <blockquote>
    <p>newjson.json</p>
  
  <pre><code>{
      "title":"My Title",
      "contents":"My\
                  Multiline\
                  Contents"
  }
  </code></pre>
  </blockquote>
  
  <p>I used <code>\</code> to avoid an error in JavaScript syntax that doesn't allow multiline strings, but when I load it with <code>file_get_contents()</code> and decode it using <code>json_decode()</code> in PHP, it can't parse it. </p>
  
  <p>I think I should handle the <code>\</code>s with <code>preg_replace</code>, or something before I put the string in a decode function.</p>
  
  <p>What should I do?</p>