title: Type Mismatch error In Parsing to Json Formate in java
body: <p>Hello EveryOne !
                     I have a List object that i need to parse into Json type using gson1.1 jar but its is giving type mismatch error ..here is my code..</p>
  
  <pre><code>public static List&lt;Product&gt; getCartList() {
      List&lt;Product&gt; cartList = new Vector&lt;Product&gt;(cartMap.keySet().size());
      for(Product p : cartMap.keySet()) {
          cartList.add(p);
      }
  
       Gson gson = new Gson();
       // convert your list to json
       String jsonCartList = gson.toJson(cartList);
       // print your generated json
       System.out.println("jsonCartList: " + jsonCartList);
  
       return jsonCartList;
  
          }
  </code></pre>
  
  <p>Plz Guys Help me Thanx in advance..</p>