title: gson: Treat null as empty String
body: <p>I use <a href="http://code.google.com/p/google-gson/">google-gson</a> to serialize a Java map into a JSON string. It provides <a href="https://sites.google.com/site/gson/gson-user-guide#TOC-Null-Object-Support">a builder handles null values</a>:</p>
  
  <pre><code>Gson gson = new GsonBuilder().serializeNulls().create();
  </code></pre>
  
  <p>The problem is that the result is the string <code>null</code>, as in:</p>
  
  <pre><code>gson.toJson(categoriesMap));
  {"111111111":null}
  </code></pre>
  
  <p>And the required result is:</p>
  
  <pre><code>{"111111111":""}
  </code></pre>
  
  <p>I can do a String-replace for <code>null</code> and <code>""</code>, but this is ugly and prone to errors. Is there a native gson support for adding a custom String instead of <code>null</code>? </p>