title: Converting json string of Intent to object of Intent giving exception
body: <p>I am using Gson class to convert JSON string data to <a href="http://developer.android.com/reference/android/content/Intent.html" rel="nofollow"><code>Intent</code></a> object. But I am getting exception.</p>
  
  <p>JSON string of Intent:</p>
  
  <pre><code>{
     "targetIntent":{
        "mAction":"android.intent.action.VIEW",
        "mData":{
           "authority":{
              "decoded":"com.android.contacts",
              "encoded":"com.android.contacts"
           },
           "fragment":{
  
           },
           "path":{
              "decoded":"NOT CACHED",
              "encoded":"/contacts/lookup/1471i541ce89b89ad6a59"
           },
           "query":{
  
           },
           "scheme":"content",
           "uriString":"NOT CACHED",
           "host":"NOT CACHED",
           "port":-2
        },
        "mFlags":0
     }
  }
  </code></pre>
  
  <p>Conversion code:</p>
  
  <pre><code>Intent targetIntent =
      gson.fromJson(histroyDataObject.getString("targetIntent"), Intent.class);
  </code></pre>
  
  <p>This gives exception:</p>
  
  <pre><code>Cause: Instantiation Exception
  Detail Message: Failed to invoke private android.net.Uri() with no args
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>08-31 01:08:19.045: W/System.err(290): Caused by: java.lang.InstantiationException: android.net.Uri
  08-31 01:08:19.065: W/System.err(290):  at java.lang.reflect.Constructor.constructNative(Native Method)
  08-31 01:08:19.065: W/System.err(290):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
  08-31 01:08:19.065: W/System.err(290):  at com.google.gson.internal.ConstructorConstructor$2.construct(ConstructorConstructor.java:91)
  08-31 01:08:19.076: W/System.err(290):  ... 24 more
  </code></pre>
  
  <p>Thanks for your help.</p>