public static void main(String[] args) {
Map<String, Object> map = new LinkedHashMap<String, Object>();
map.put("field1", "typeA");
map.put("field2", "typeA");
map.put("field3", "typeB");
Map<String, Object> map2 = new LinkedHashMap<String, Object>();
map2.put("fieldA", "typeA");
map2.put("fieldB", "typeB");
Map<String, Object> map3 = new LinkedHashMap<String, Object>();
map3.put("fieldX", "typeB");
map3.put("fieldY", "typeB");
map2.put("subGroup1", map3);
map2.put("fieldC", "typeC");
map.put("group1", map2);
map.put("field4", "typeA");
Map<String, Object> map4 = new LinkedHashMap<String, Object>();
map4.put("fieldA", "typeB");
Map<String, Object> map5 = new LinkedHashMap<String, Object>();
map5.put("fieldX", "typeA");
map5.put("fieldY", "typeA");
map4.put("subGroup1", map5);
map4.put("fieldB", "typeA");
map4.put("fieldC", "typeC");
map.put("group2", map4);
map.put("field5", "typeC");
map.put("field6", "typeD");
System.out.println(map);
}