+ -
当前位置:首页 → 问答吧 → Json去掉反斜线

Json去掉反斜线

时间:2011-03-25

来源:互联网

从.net web service得到Json字符串,但是里面去含有反斜线
JScript code

 "{"d":"[{\"CategoryName\":\"asas\",\"FatherId\":0,\"CategoryId\":3},{\"CategoryName\":\"test\",\"FatherId\":0,\"CategoryId\":4},{\"CategoryName\":\"C#\",\"FatherId\":0,\"CategoryId\":5},{\"CategoryName\":\"dsds\",\"FatherId\":0,\"CategoryId\":6},{\"CategoryName\":\"Vb\",\"FatherId\":0,\"CategoryId\":7},{\"CategoryName\":\"Vb\",\"FatherId\":0,\"CategoryId\":8},{\"CategoryName\":\"test\",\"FatherId\":0,\"CategoryId\":9},{\"CategoryName\":\"fuck gfw\",\"FatherId\":0,\"CategoryId\":10},{\"CategoryName\":\"Jquery\",\"FatherId\":0,\"CategoryId\":11},{\"CategoryName\":\"121\",\"FatherId\":0,\"CategoryId\":12},{\"CategoryName\":\"121\",\"FatherId\":0,\"CategoryId\":13}]"}"



能有什么办法在前端去掉斜线马?

作者: meceky   发布时间: 2011-03-25

搂住试试用json2.js作json object和string之间的转换

作者: showenxxx   发布时间: 2011-03-25