title: Parsing nested JSON with GSON
body: <p>I have JSON object as </p>
  
  <pre><code>{"Field1":"Value1",
   "MessageId":"12345",
   "Message":"{"Field1":"Value",
              "Field2":"Value2",   
              "Field3":["Value3"]
             }"
   }
  </code></pre>
  
  <p>I am want to deserialize the inner message into an object. To this I wrote:</p>
  
  <pre><code>public MessageObject deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
          final JsonObject jsonObject = json.getAsJsonObject().getAsJsonObject("Message");
  
          final String field1 = jsonObject.get("Field1").getAsString();
          final String field2 = jsonObject.get("Field2").getAsString();
          final String field3 = jsonObject.get("Field3").getAsArray();
  ... 
  </code></pre>
  
  <p>However in my unit tests it errors out as invalid JSON. I can always guarantee that the inner message is a Json object.
  To this I also tried escaping the message String with \\, but it still errors out as errors out as unable to cast JsonPrimitive to JsonObject for: </p>
  
  <pre><code>\"Message\":\"{\\\"Field1\\\":\\\"Value\\\",
              \\\"Field2\\\":\\\"Value2\\\",   
              \\\"Field3\\\":[\\\"Value3\\\"]
             }\"
  </code></pre>
  
  <p>Is there someway I can get GSON to parse the inner object as JSON as well?</p>