Here is my code
Gson gson = new Gson();
HashMap<String, String> map = new HashMap<>();
map = gson.fromJson(new FileReader(inputFile), map.getClass());
The content of the inputFile is
{
"key1": "[\"value1\"]",
"key2": "value2"
}
When I inspect the value of map.get("key2") during debugging in Eclipse, the value is actually (java.util.ArrayList<E>) [value1]
How can I make Gson deserialize the content to
{key1="[value1]", key2=value2}
Thanks