https://nodejs.org/dist/latest-v5.x/docs/api/querystring.html
序列化:
querystring.stringify({name:'Lee',course:['abc','efg'],form:'post'}) 'name=Lee&course=abc&course=efg&form=post’ querystring.stringify({name:'Lee',course:['abc','efg'],form:'post'},',') 'name=Lee,course=abc,course=efg,form=post' querystring.stringify({name:'Lee',course:['abc','efg'],form:'post'},',',':') 'name:Lee,course:abc,course:efg,form:post'
反序列化:
querystring.parse('name=Lee&course=abc&course=efg&form=post'); { name: 'Lee', course: [ 'abc', 'efg' ], form: 'post’ } 转义 querystring.escape('李钊鸿'); '%E6%9D%8E%E9%92%8A%E9%B8%BF’ querystring.unescape('%E6%9D%8E%E9%92%8A%E9%B8%BF') '李钊鸿'