Should Use this way to convert into map :
String student[] = students.split("\\{|}");
String id_name[] = student[1].split(",");
Map<String,String> studentIdName = new HashMap<>();
for (String std: id_name) {
String str[] = std.split("=");
studentIdName.put(str[0],str[1]);
}