2016年(89)
分类: Web开发
2016-03-11 21:02:22
安装依赖包
npm install rsj
示例
rsj = require('rsj');//RSS as JSON when use it we must (npm install rsj) first rsj.r2j('(json) { var obj = eval('(' + json + ')');//js原生方法 //var obj = JSON.parse(json);//json.js包 res.render('index', { title: 'testbook',layout:'layout',nav:'index',rssData:obj}); });