title: Use hardcoded json strings when parsing with gson
body: <p>sorry if the question have been answered previously but I didn't find anything.</p>
  
  <p>The problem is as follows: I use GSON to serialize/deserialize my json requests and responses into objects. It works well, but lately I've bumped into a problem when serializing:</p>
  
  <p>I want to send a complex request. Since I didn't designed the server side I have to accommodate my self with what they give me, so I have this json:</p>
  
  <pre><code>{
    "id": null,
    "name": "n",
    "description": "some description",
    "type": 1,
    "channel": 0,
    "styles": [{
      "styleID": 1,
      "style": {... // lots of properties nested one inside another }
    }]
  }
  </code></pre>
  
  <p>The problem is: I cannot create a class for each subProperty of "style", which are : "events", "buttons", "labels" etc...
  So I thought I'd put it like this:</p>
  
  <pre><code>public class MyData {
    private Integer id;
    // ...
    private String styles = getStylesJsonString(); // hardcoded styles in json format
  }
  </code></pre>
  
  <p>But I can't, because in the end it becomes:</p>
  
  <pre><code> "styles": "[{...}]"
  </code></pre>
  
  <p>which is invalid (according to the server).</p>
  
  <p>So any ideas?</p>