javascript-json-pro
v1.0.3
Published
javascript json 操作库高级版
Downloads
11
Readme
javascript-json-pro
介绍
javascript json 操作库高级版 用于转义字符串 方便储存数据库
使用说明
jsonPro.stringify("<h1>你好世界</h1>")
%3Ch1%3E%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C%3C%2Fh1%3E
jsonPro.parse(jsonPro.stringify("<h1>你好世界</h1>"))
<h1>你好世界</h1>
jsonPro.stringify({data:"<h1>你好世界</h1>",code:0,msg:[1,2,3,"<h1>你好世界</h1>"]})
{"data":"%3Ch1%3E%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C%3C%2Fh1%3E","code":0,"msg":[1,2,3,"%3Ch1%3E%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C%3C%2Fh1%3E"]}