am facing quite weired issue, in android am having one hashmap object of this type:
HashMap<String, ArrayList<String>> cart = null;
this is my cart object where i put my cart items, in android device version 4.4.2 and onwards this object is correctly sent to server in this format :
{"6":["Veg Biryani","599.0","0.0","1"],"5":["Chiken Tanduri","599.0","0.0","2"]}
But, in older versions before 4.3 it's just sending the above object in this format:
{"26":"[Test, 1465.0, 0.0, 2]","5":"[Chiken Tanduri, 599.0, 0.0, 3]"}
as we can see in second format the hashmap object value is entirely encoded as a string, which should not be the case,
In order to sent this object to server am just casting it to JSONObject and stringify it to sent to server.
String.valueOf(new JSONObject(cart))
Can someone please point me, what am doing wrong in the above code.
Any help would be greatly appreciated.
Thank You!