title: Google Cloud Endpoints can't return Map (instead it returns JsonMap)
body: <p>Google Cloud Endpoints returns a <code>JsonMap</code> instead of my server side <code>Map&lt;Long,Long&gt;</code>.  <strong>How can I get the <code>Map&lt;Long,Long&gt;</code> ?</strong></p>
  
  <p>On the Google App Engine side I define a Google cloud endpoint that returns a map:</p>
  
  <pre><code>@ApiMethod(path="somebendpoint/somename")
  public Map&lt;Long, Long&gt; getSomething(@Named("x")int x, User user){
      Map&lt;Long, Long&gt; map = ...   
      return map;
  }
  </code></pre>
  
  <p>On the Android client side, I retrieve this with</p>
  
  <pre><code>wEndpoint.wEndpoint().getSomething(x).execute();
  </code></pre>
  
  <p>But the return type is a <code>JsonMap</code>, which is <code>Map&lt;String,Object&gt;</code>.</p>
  
  <h2>---</h2>
  
  <p>--- edit (Wrapping the Map in a wrapper class also doesn't seem to work)</p>
  
  <p>I wrapped Map on the server side in a wrapper class, like this:</p>
  
  <pre><code>public class WrapperMap implements Serializable {
      private Map&lt;Long, Long&gt; wrapperMap;
      public WrapperMap(){
      }
      public setMap(Map&lt;Long, Long&gt; map){
          wrapperMap = map;
      }
      public Map&lt;Long, Long&gt; getMap(){
          return wrapperMap;
      }
  } 
  </code></pre>
  
  <p>but still on the client side, when I do:</p>
  
  <p>WrapperMap temp = wEndpoint.wEndpoint().getSomething(x).execute();</p>
  
  <p><code>temp.getMap()</code> returns a <code>JsonMap</code>, not a <code>Map&lt;Long,Long&gt;</code></p>
  
  <p>Thanks</p>