if (!arg0.isJsonObject()) {
throw new JsonParseException(arg0.toString() + " is not Json Object, cannot convert to map");
}
JsonObject objs = arg0.getAsJsonObject();
Map<String, String> map = new HashMap<String, String>();
for (Entry<String, JsonElement> e : objs.entrySet()) {
if (!e.getValue().isJsonPrimitive()) {
throw new JsonParseException(e.getValue().toString() + " is not a Json primitive," + arg0 + " can not convert to map");
}
map.put(e.getKey(), e.getValue().getAsString());
}