title: How can I prevent gson to try to parse value of my variable?
body: <p>Recently I've got an interesting problem with getting json string out of the object using gson library. </p>
  
  <p>My object has a simple form:</p>
  
  <pre><code>class MyObject{
   public String myString = "{\"payload\":\"test\"}";
  
   setters &amp; getters
  }
  </code></pre>
  
  <p>The value of myString is a json string. </p>
  
  <p>So when I'm trying to use  </p>
  
  <pre><code>MyObject myObject = new myObject();
  Gson gson = new Gson();
  String payload = gson.toJson(myObject);
  </code></pre>
  
  <p>I got an exception saying:</p>
  
  <p>Failed to process Expression Evaluation "json:payload".</p>
  
  <p>So it looks like gson is trying to parse the value of the field in myObject, which is unexpected and weird.</p>
  
  <p>How can I prevent gson to try to parse value of my variable?</p>
  
  <p>Thanks,
  Laura.</p>