{"menu":[{"childMenus":[{"childMenus":[{"id":"4","name":"4","order":0,"parentId":"2"},{"childMenus":[{"childMenus":[{"id":"9","name":"9","order":0,"parentId":"10"}],"id":"10","name":"10","order":0,"parentId":"6"}],"id":"6","name":"6","order":0,"parentId":"2"},{"childMenus":[{"id":"11","name":"11","order":0,"parentId":"7"}],"id":"7","name":"7","order":0,"parentId":"2"}],"id":"2","name":"2","order":0,"parentId":"1"},{"childMenus":[{"id":"8","name":"8","order":0,"parentId":"3"}],"id":"3","name":"3","order":0,"parentId":"1"}],"id":"1","name":"1","order":0,"parentId":"0"},{"id":"5","name":"5","order":0,"parentId":"0"}]}
JSON.toJSONString(jsonMap);
import com.alibaba.fastjson.JSON;
alibaba封装的这个包,解读list类型的数据,输出就是上面的样子。