title: Separate Monaco editor visual value from the actual value
body: <p>I'm trying to use Monaco editor as a JavaScript plain object editor, but you can't simply show an object literal as the value because that'll be parsed as a block and the first key of the object will be treated as the block label.</p>
  <pre class="lang-js prettyprint-override"><code>{
    id: 1 // id is an unsed label
  }
  </code></pre>
  <p>There are ways to work around this, like exporting the object like <code>export default {}</code> or assign it to a variable such as <code>const value = {}</code> or even wrap the object literal in parentheses like <code>({})</code>. I was wondering if there's a better way to do it?</p>
  <p>Maybe a way to show the editor value as <code>{id: 1}</code> but actually tell the editor that the real value is <code>const value = {id: 1}</code>?</p>