需要在 java中接收redis的字符串
[
{
"MENU_ICON": "<i class=\"zmdi zmdi-laptop-mac zmdi-hc-fw\">",
"MENU_ID": "1",
"MENU_NAME": "系统管理",
"MENU_ORDER": "1",
"MENU_STATE": "1",
"MENU_TYPE": "2",
"MENU_URL": "#",
"PARENT_ID": "0",
"hasMenu": false
},
{
"MENU_ICON": "<i class=\"zmdi zmdi-headset-mic zmdi-hc-fw\">",
"MENU_ID": "72",
"MENU_NAME": "我的通讯",
"MENU_ORDER": "3",
"MENU_STATE": "1",
"MENU_TYPE": "1",
"MENU_URL": "#",
"PARENT_ID": "0",
"SHIRO_KEY": "(无)",
"hasMenu": false
}
]
在java中我是这么写的
String json=JSON.toJSONString(JSON.parse(redisUtil.getList("menu-"+parentId).toString()));
List<T> list=JSONArray.parseArray(json,Menu.class);
提示错误
syntax error, expect {, actual [, pos 0, fastjson-version 1.2.44
我应该如何解析