title: Converting JSON object with Bitmaps
body: <p>I have an object which contains a few string members and a bitmap member.</p>
  
  <p>The object is held in a map with a String key and the Object as the value.</p>
  
  <p>I'm using the following code to convert the map:</p>
  
  <pre><code>String json = new Gson().toJson(aMap);
  </code></pre>
  
  <p>and then to extract the JSON map I use (passing the above JSON string):</p>
  
  <pre><code>Map&lt;String, Object&gt; aMap;
      Gson gson = new Gson();
      aMap = gson.fromJson(jsonString, new TypeToken&lt;Map&lt;String, Object&gt;&gt;() {}.getType());
  </code></pre>
  
  <p>This partially works but the bitmap stored in the object appears to corrupted? i.e. when I try to apply bitmap to an image view I get an exception.</p>
  
  <p>I'm thinking I may need to separately convert the bitmap to a string for JSON but hoping theres a simpler solution, any ideas?</p>
  
  <p>Thanks.</p>