title: Issue : Serializing using Jersey, Deserializing JSON using gson
body: <p>I have been using <a href="http://jersey.java.net" rel="nofollow">Jersey</a> for REST API and returning JSON. On client side I am using <a href="http://code.google.com/p/google-gson/" rel="nofollow">google-gson</a>. While deserializing JSON, I am getting following error.</p>
  
  <pre><code>com.google.gson.JsonParseException: The JsonDeserializer MapTypeAdapter failed to deserialized json object {} given the type interface java.util.Map
          at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:63)
          at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:88)
          at com.google.gson.JsonObjectDeserializationVisitor.visitFieldUsingCustomHandler(JsonObjectDeserializationVisitor.java:116)
          at com.google.gson.ObjectNavigator.navigateClassFields(ObjectNavigator.java:158)
          at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:131)
          at com.google.gson.JsonDeserializationCo
  </code></pre>
  
  <p>The Object which is being serialized to JSON by Jersey is having non-generic(no type specified) Map and List</p>
  
  <pre><code>public class Dealer implements Serializable
  {
    private String serviceURL;
    private Map hoursService;
    List dealerAttributes;  
  }
  </code></pre>
  
  <p>Here is the JSON generated by Jersey</p>
  
  <pre><code>{"serviceURL":www.google.com,"hoursService":{"3":{"dayOfWeek":3,"closeTime":"6:30 PM","openTime":"7:30 AM"},"2":{"dayOfWeek":2,"closeTime":"6:30 PM","openTime":"7:30 AM"},"1":{"dayOfWeek":1,"closeTime":"6:30 PM","openTime":"7:30 AM"}},"dealerAttributes":[{"language":"English","dealerAttributeName":"Spanish Speaking","updateDate":1174971061000},{"language":"English","updateDate":1103003316000}]}
  </code></pre>
  
  <p>What could be the reason. Please help me to resolve this issue. Is there any other utility which is better than gson? Please suggest.</p>
  
  <p>Thanks.</p>