1, {\ "count\": \ "3\", \ "errorstring\": \ "\", \ "success\": True,\ "url\": \ "http:\\\/\\\/172.16.80.65:8080\\\/ Loginsso.aspx? Usercode=wubg&type=workitem\ ", \" userid\ ": \" 1226\ ", \" biztype\ ": \" 19110\ ", \" Results\ ": [{\" activityid\ ": \" 6d216e2b-25dc-4978-88a8-2fb5bfbd690c\ ", \" activityname\ ": \" department head \ ", \" money\ ": \" \ ", \" participantid\ ": \" 1226\ ", \" Participantname\ ": \" Wu precious \ ", \" preactivityname\ ": \" \ ", \" starttime\ ": \" 2017\\\/6\\\/21 20:55:59\ ", \" state\ ": \" 0\ ", \ "type\": \ "asset disposition \", \ "workid\": \ "46789861-4dc5-4dd9-87e0-5cb4df8bf3ff\", \ "workitemurl\": \ "Sbmanager\\\/equipment_ Assetdispose_new.aspx?sitemap= ' Location: Life cycle Management > Asset Disposition > Department head ' \ '},{\ ' activityid\ ": \" 05ec02e4-6e11-4791-b2ed-9debf6fef516\ ", \" activityname\ ": \" Departmental leadership opinion \ ", \" money\ ": \" \ ", \" participantid\ ": \" 1226\ ", \ "participantname\": \ "Wu precious \", \ "preactivityname\": \ "\", \ "starttime\": \ "2017\\\/6\\\/21 20:41:57\", \ "state\": \ "0\", \ "type\": \ "asset out of library \", \ "workid\": \ "56ae6661-4379-4b25-b231-2586609d0e11\", \ "workitemurl\": \ "databasebef\\\/ Equipment_yanshou_ck_new.aspx?sitemap= ' Location: Lifecycle Management > Acceptance Outbound > Departmental leadership opinions ' \ "},{\" activityid\ ": \" 9f0cc043-6bea-446c-90ac-1b228450ebd0\ ", \" Activityname\ " : \ "Use department head opinion \", \ "money\": \ "\", \ "participantid\": \ "1226\", \ "participantname\": \ "Wu precious \", \ "preactivityname\": \ "\", \ "starttime\": \ "2017\\\/6\\\/21 21:25:56\", \ "state\": \ "0\", \ "type\": \ "Picking out the library list \", \ "workid\": \ " 980ee135-2587-4469-9b5a-8929afcfc728\ ", \" workitemurl\ ": \" sbmanager\\\/equipment_ql.aspx?sitemap= "Location: Lifecycle Management > Asset picking > Using department heads ' \ "}]}
2, the JSON format string in 1 is processed as a JSON object, you need to first remove the escape "\"
result = Stringescapeutils.unescapejava (result); New jsonobject (result); Jsonobject.get ("Count");
Java handles escape slashes in JSON-formatted data