Thank you for the reply.
I tried following kind of code, and it works:
Gson g = new Gson();
Map<
String, Map><String, String>> m4 = g.fromJson(sz,new TypeToken<Map><String, Map><String, String>>>(){}.getType());
Map<String, Map><String, String>> map = g.fromJson(jsonString, m4)
But problem here is, I need to know the entire HashMap depth level. Can I just get a HashMap object without knowing the depth level...something like:
retMap = gson.fromJson(json, Map),
so that I don't know whether its Map<String, Map><String, String>> or just Map<String, String>?