title: How can CodeMirror display an 'javascript object' string with object structure
body: <p>I start use <a href="http://codemirror.net/doc/manual.html" rel="nofollow noreferrer">code mirror</a>, and i want to display an object with object structure.</p>
  
  <p>I have a file with this content</p>
  
  <pre><code>{ property1: 'value', property2: { property3: 'value' }}
  </code></pre>
  
  <p>This is written in one line in .txt file.</p>
  
  <p>Now i want to use code mirror so user can edit this file content.
  I get the file content using HTTP call and after that i have this code</p>
  
  <pre><code>        var editor = CodeMirror(document.getElementById('reportEditor'), {
              mode: { name: "javascript", json: true },
              theme: "default",
              lineNumbers: true,
              readOnly: false,
              value: JSON.stringify(response.data),
          });
  </code></pre>
  
  <p>This works fine, i get the content but code mirror display it in one line.</p>
  
  <p>How can force Code Mirror to display this value like an object structure like</p>
  
  <pre><code> { 
        property1: 'value', 
        property2: { 
             property3: 'value' 
        }
   }
  </code></pre>
  
  <p>I found on this  <a href="https://devtoolsonline20190908040816.azurewebsites.net/" rel="nofollow noreferrer">site </a> a very good json prettifier</p>