Parse JSON string to Dictionary<String, Integer> with Gson

Viewed 11653

I have a JSON string which looks as following: {"altruism":1,"amazon":6}

What I want to have is a HashMap<String, Integer> with two entries afterwards.

Key: altruism Value: 1
Key: amazon Value:6

I really can't figure out how to do this. Normally there are objects parsed from JSON strings, but that's not the case here.

1 Answers
Related