title: JsonObject add property - maps
body: <p>I have a class called Test with a <code>String id</code> field and a <code>HashMap map</code> like  <code>Map&lt;String, String[]&gt;</code>, <code>Map&lt;String, ArrayList&lt;String&gt;&gt;</code>, and <code>Map&lt;String, HashMap&gt;</code> (Here the second <code>HashMap</code> is a <code>&lt;String, Integer&gt;</code> one) I have the following code.</p>
  
  <pre><code>JsonObject jsonObject = new JsonObject();
  
  jsonObject.addProperty("id", test.getId);
  </code></pre>
  
  <p>Like this, I want to add the Map to this. Adding like <code>jsonObject.addProperty("map", String.valueOf(test.getMap()));</code> does not do the work properly as it add "(commas) to beginning and end. Can somebody tell me what is the correct way to do it?</p>