Hi I have nested object with consisting of hashes and lists. I am trying to use gson but doesnt seem to work well if the values in hashmaps are hashmaps instead of simple strings.

```
Map questionDetails = new HashMap<>();
questionDetails.put("label", descriptionNode.getText());
questionDetails.put("validations", new HashMap<>().put("compulsary", 1));
System.out.println(new Gson().toJson(questionDetails));

```

if prints

```
{"label":"I am working on something"}

```

while

```
Map questionDetails = new HashMap<>();
questionDetails.put("label", descriptionNode.getText());
questionDetails.put("validations", "something");
System.out.println(new Gson().toJson(questionDetails));

```

seems to work well.