I have created GsonUtils lib for this case. I add this into maven central repository.
Map<String, SimpleStructure> expected = new HashMap<>();
expected.put("foo", new SimpleStructure("peperoni"));
String json = GsonUtils.writeValue(expected);
Map<String, SimpleStructure> actual = GsonUtils.readMap(json, String.class, SimpleStructure.class);