Map> map = new HashMap>(); Map tmp = new HashMap(); tmp.put("b", "so"); tmp.put("c", "easy"); map.put("a", tmp); vs {a: {b: "so", c: "easy"}}