title: Parse Java object to Javascript
body: <p>In Spring MVC and Jackson I have a really big Java object that I parse to a JSON string <code>myBigJSONString</code> (~1MB) and inline it into my HTML.</p>
  
  <p>Then in my Javascript I do a <code>JSON.parse(myBigJSONString)</code> and everything works dandy.</p>
  
  <p>However if I were to inline an syntactically correct Javascript object into my HTML and not a string representation thereof, my Javascript wouldn't have to read this huge string and parse it. It would already be parsed.</p>
  
  <p>Question: How do I create a Javascript object from my Java object and inline it directly without going through a JSON string?</p>
  
  <p>EDIT:</p>
  
  <p>This is how my finished HTML looks right now:</p>
  
  <pre><code>var staticDataString = '[{\"propertyA\":\"valueA\"}, {\"propertyB\":\"valueB\"}]';
  var staticData = JSON.parse(staticDataString);
  </code></pre>
  
  <p>This is how i want it to look</p>
  
  <pre><code>var staticData = [{propertyA:"valueA"}, {propertyB:"valueB"}];
  </code></pre>