My JSON looks like follow :
JSON
\"message_defaults\": { \"LabResultsRequestDefaultMessage\": { \"MsgTypeId\": 8, \"StaffId\":
You can do the following without changing your json structure.
Type mapType = new TypeToken>() {}.getType(); Map messagesMap = gson.fromJson(json, mapType); List messages = new ArrayList(messagesMap.values());