Assuming a well-formed string, with no commas in the key and the value, a very simple solution can be:
String str = ...
str = str.substring(1, str.length() - 1); // removing the {}
String[] entries = str.split(","); // get all the "key":value
for (String entry: entries) {
String[] entryData = entry.split(":"); // get the key and the value
String key = entryData[0];
key = key.substring(1, key.length() - 1); // removing the "" from key
String value = entryData[1];
System.out.println(key + " -> " + value);
}
You can test here: http://ideone.com/weEbt2
If you want to have commas in keys or values, I think you have to make a little parser.